Amazon interview question

Problem on Strings and arrays