Infosys interview question

Puzzles