I think it is important to point out that the Map in this post actually refers to HashMap which is actually a specific type of Map. The problem with HashMap is, due to it using hashes underneath, it's only used when you don't need to know the order of elements. The more general version of a Map utilizes a self-balancing Red-Black binary tree underneath which does O(log N) insertion/deletion but maintains order unlike HashMap. EDIT: Additionally, another one of the weaknesses of HashMap is the possibility for occasional collisions that result in O(n) time delay. Unlike the more widely used general Red-Black tree implementation of Map, HashMap is entirely dependent on the hash function for its speed.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I think it is important to point out that the Map in this post actually refers to HashMap which is actually a specific type of Map. The problem with HashMap is, due to it using hashes underneath, it's only used when you don't need to know the order of elements. The more general version of a Map utilizes a self-balancing Red-Black binary tree underneath which does O(log N) insertion/deletion but maintains order unlike HashMap. EDIT: Additionally, another one of the weaknesses of HashMap is the possibility for occasional collisions that result in O(n) time delay. Unlike the more widely used general Red-Black tree implementation of Map, HashMap is entirely dependent on the hash function for its speed.