Limeroad Interview Question

Puzzle