Pregunta de entrevista de Amazon

Array based question and String question.