Infosys interview question

Coding based knowledge testing were there