Hashing — A Fast Data Structure !!
So, What’s Hashing ??
As, the internet had grown to accommodate millions of users and Terabytes of data. It became hard, to use the common types of Data Structures to link the content in the internet. The time taken to access a particular piece of information was gradually increasing.
So, a new type of data structure called Hashing, was introduced. It reduced the time complexity to store and retrieve information.
Hashing has a time complexity of O(1), whereas other data structures such as an Array or a Linked List took a time complexity of O(log n) or O(n), based on the list is sorted or not.
In Hashing, a key is generated from the given data. And, the data is inserted at that key location. This reduces the number of comparisons, while performing various operations, in turn also reducing the time for the program run.