Hashing
Hashing is a different type of search technique, wherein the key values of the vector are directly accessed. It is a process of searching the element using some computation to map its key value to a position in the vector. The values of the vector can be placed in any order satisfying certain calculations rather than being based on any key value or their frequency of access. The function which performs the computation to map the key values to positions in a vector is termed a hash function, also denoted by h. The vector which holds the elements after the necessary calculations is termed a hash table (also denoted by HT), and its positions (or keys) are termed slots. The number of slots in a hash table is denoted by m, and each slot is numbered between 1 and m. The key objective of hashing is to arrange the elements in a hash table HT such that for any key value K and some hash function h, the slot in the hash table is defined as i = h(K), where i lies between 1 to m and the element...