6 ms·
It is not expecting Devs to know the foundamnetals, developer should know why it is faster to look for elements in an hash map than in a list. It is expecting t
by siscia 6y ago
It is not expecting Devs to know the foundamnetals, developer should know why it is faster to look for elements in an hash map than in a list. It is expecting to code an hash map from scratch in ten minutes on a whiteboard.
(And hash map are not even that difficult, but I got asked stuff much more complex than that...)
- itsjzt 6y agoAfaik best case of finding an element in a list is fast as anywhere else.
- partyboat1586 6y agoHash map is O(1), List is O(N). Unless it's a really small data set the hashmap will be faster. I don't think OP wanted best case.