Solved HR Algorithms Warmup - Manasa and Stones. Solution good but timesout.