CRISIL interview question

Hashmap working