Rippling Interview Question

Algo problem & design problem