Rippling interview question

Solve a multi part problem