Hash
Learn what hash is and how it works.
We'll cover the following...
What is a hash?
Hash data structure has many names: hash, hash table, map, dictionary, and even object in JavaScript. Hash and array are essential data structures for any programmer. These data structures are different, but they were designed for the same goal: to store and retrieve data. The only difference is how these two operations are implemented.
What is an array, and how do we store and get the data back from an array? Imagine that a child has lots of toys. The mother puts all these toys on a single shelf and assigned a sequential number to each: one, two, three and so on. We need to visually scan the entire shelf if we want to find our favorite toy. It can take some time if the shelf is ...