Compute minimum time with task cooldowns | Chime Interview Question