Hash Table and Binary Tree
Hash Table Hash table is a data structure which stores data in an associative manner. Data is stored in an array format in a hash table, where each data has a unique index value. Thus, the insertion and search of a data can be done in a very short period of time, provided we know the index beforehand. These indexes can be found using a technique dubbed Hashing . Hashing Hashing is a technique to convert certain key values from a data to a range of indexes for an array. There are many ways to hash, the simplest ones include taking the value of key then divide them by the number of available addresses, and take the remainder. The above code does exactly what the example did. However, one can clearly see a problem with it. If 2 keys result in the same hash, then the first hash will be replaced by the second and so on. This phenomena is ca...