hashtable - What's the point of a hash table? -


I have no experience with the hash table outside of arrays / dictionaries in dynamic languages, so I have recently discovered That internally they are using it to create a hash of keys and store the value. Why I do not understand why it is not the key (string, number, whatever) as well stored values ​​with the key, instead of creating a hash and storing it instead

This is a close duplicate:

Long story short, you can check Whether or not a key is already stored very quickly, and store a new mapping evenly, otherwise you will have to keep a sorted list of keys, which is very slow to store and retrieve mapping.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -