// 24 == 3 * (2^3) 
// prime numbers: 2 & 3
 
Factoring 24 suggests 8-hour shifts, not 5-hour shifts.  Knowing this when scheduling can be.. helpful.// (x+2) * (x-1) * (2*x-5)  ==  2*x^3 - 9*x^2 + 6*x + 10 
// mathematically these are prime "numbers": 
//  (x+2) 
//  (x-1) 
// (2x-5)
 
Break large pieces into independent, self-explanatory ingredients. Make your code an archipelago.struct PhoneCall { 
  void act(Connection*); 
  Connection*   answer(); 
  Connection*   call(PhoneNumber); 
  void          endcall(); 
  PhoneNumbers  assist(string); 
  PhoneNumbers  assist(long); 
  int     push(Message);// return queue length. 
  Message pop(); 
}; 
struct Playlist { 
  void    act(Song*); 
  Songs match(string) const; 
  Songs match(Midi)   const; 
  Song pop(); 
  int push(Song); // return queue length. 
}; 
Having few dependencies.  Factored code. nedwaves.com 2017 [171108]