Infosys interview question

Was on List, string mostly