Infosys Interview Question

coding questions in strings and arrays