Hashing
The searching techniques that were discussed in the previous sections are based on comparison of keys. We need search techniques in which there are no unnecessary comparisons of keys. We need search techniques in which there are no unnecessary comparisons. Therefore the objective here is to minimize the number of comparisons in order to find desired record efficiently.
There is an approach in which we compute the location of the desired record in order to retrieve it in a single access. This avoids the unnecessary comparison. In this method the location of the desired record present in the search table depends only on the given key but not on other keys. for example if we have a table of n students records each of which is defined by the toll number key. This roll number key takes value from 1 to n inclusive. If the roll number key takes values from 1to n inclusive. If the roll number is used as an index into the students table we can directly find the information of student in question. Therefore array can be used to organize records in such a search table
Hash Table
A hash table is a data structure where we store a key value after applying the hash function it is arranged in the form of an array that is addressed via a hash function. The hash table is divided into a number of buckets and each bucket is in turn capable of storing a number of records. Thus we can say that a bucket has number of slots and each slot is capable of holding one record.
The time required to locate any element in the hash table is 0 (1). It is constant and it is not depend on the number of data elements stored in the table. Now question is how we map the number of keys to a particular location in the hash table I h (k) it is computed using the hash function.
Data Structure & Algorithms Assignment Help, Live Experts
Struggling with data structure problems? Data structure subject is quite tough to learn? Need quick assistance in data structure questions? ExpertsMind.com is right place for you where your search ends, We at ExpertsMind offer online data structure assignment help, data structure homework help and data structure and algorithms question’s answers by best online support by qualified tutors.
ExpertsMind.com - Define Hashing Assignment Help, Define Hashing Homework Help, Define Hashing Assignment Tutors, Define Hashing Solutions, Define Hashing Answers, Searching and Hashing Assignment Tutors