Hash clash, Data Structure & Algorithms

Q. What do you understand by the term by hash clash? Explain in detail any one method to resolve the hash collisions.                                                                                                   


Hashing is not a perfect technique. The collision occurs seldom when the two different key hash into the same hash value and are also assigned to the same array element by mistake. Programmers have come up with number of techniques for dealing with this problem. An ordinary way to deal with a collision is to create a linked list of entries that have their hash value same. For example, let the key of each entry hashes to the same hash value and this process result in both being assigned to the same array element of the particular hashtable.

Because the two entries cannot be assigned the same array element, the programmer makes a linked list. The first user-explained structure is assigned to the pointer in the array element. The second isn't assigned to any of the array element and is instead linked to the first user-defined structure, therefore forming a linked list.

For example: in the below table of the size 7

42, 56 both are mapped to index 0 as 42%7=0 and 56%7=0.

25, 42, 96, 101, 102, 162, 197 can be mapped as shown below:

174_Hash clash.png

Posted Date: 7/11/2012 1:34:23 AM | Location : United States

Related Discussions:- Hash clash, Assignment Help, Ask Question on Hash clash, Get Answer, Expert's Help, Hash clash Discussions

Write discussion on Hash clash
Your posts are moderated
Related Questions
Q. The two Binary Trees are said to be similar if they are both empty or if they are both non- empty and left and right sub trees are similar. Write down an algorithm to determine

We might sometimes seek a tradeoff among space & time complexity. For instance, we may have to select a data structure which requires a lot of storage to reduce the computation tim

Q. Convert the following given Infix expression to Postfix form using the stack function: x + y * z + ( p * q + r ) * s , Follow general precedence rule and suppose tha

Painter's Algorithm As the name suggests, the algorithm follows the standard practice of a painter, who  would paint the background (such as a backdrop) first, then the major d

Define Hashing. Store the following values in a hash table of table size 11 using division method: 25, 42, 96, 101, 102, 162, and 197. In case of collision, use other hash functio

explain collision resloving techniques in hasing

algorithm and flow chart to find weather the given numbers are positive or negative or neutral

if two relations R and S are joined, then the non matching tuples of both R and S are ignored in

Define the term - Array A fixed length, ordered collection of values of same type stored in contiguous memory locations; collection may be ordered in several dimensions.

Preorder traversal of a binary tree struct NODE { struct NODE *left; int value;     /* can take any data type */ struct NODE *right; };   preorder(struct N