Compute minimum servers for cyclic tasks | Google Interview Question