Infosys interview question

They asked coding questions based on strings and arrays