Nokia interview question

Based on Hashmap and basic array questions.