Capgemini interview question

Hasmap internal working