Limeroad interview question

Puzzle