Infosys interview question

coding specific basic questions