Whatever language I use, I always aim to use the equivalent of a hashmap. However, I was going through some practice interview questions and it asked what is the limitation to this?
The only reason I could think of is limited main memory, but then that wouldn’t be limited only to hashmaps, but also ArrayLists etc etc.
There’s also the potential for collisions. The cost of writing and/or executing the hashing-function could be high if the requirement for collision avoidance is strict, or if you have a small hash-space.