Question d’entretien chez ServiceNow

Write HashMap like key value store

Réponse à la question d'entretien

Utilisateur anonyme

24 mai 2024

Started with requirements and jumped to solution. defined what should be put and get should look like. Explained how do i generate hash and explained about how i would handle collisions. Few questions from interviewer and were answered. One question about how i implement hascode for key to used in hashmap. I vaguely remember that using prime number multiplication with key fields would generate a right hashcode, so was not able to explain that logic but as in real life i use IDE help i explained same