Pregunta de entrevista de Amazon

1. Array and hashmap Question 2. String question