Infosys interview question

.