Infosys interview question

one challenge faced and solution suggested