Let me start with the definition of “why Hash Tables good to use”?
Hash Tables are always good to use a quick search.
Let’s suppose we have an array full of data for instance1000 items, and we know exactly what is the index of each item, so we can access it quickly through its index. For example we know the item-abc is located on index 22 so we can apply following:
myItem = myarray;
Now, the problem is how we come to know the position of item-abc is 22?
This is where hashing comes in handy.
Given some key we can apply a hash function to it to find an index or position that we want to access.
Note: This is an answer of a question on Facebook questions application