Question d’entretien chez Amazon

Coding question, hashmap followed by some changes.