vSplash Techlabs interview question

Not difficult