Infosys interview question

Dsa based questions, so focused in problem solving