Infosys interview question

coding questions in strings and arrays