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
Sequential files are most frequently utilized in commercial batch oriented data processing where there is the concept of a master file on which details are inserted periodically. F

Explain how two dimensional arrays are represented in memory. Representation of two-dimensional arrays in memory:- Let grades be a 2-D array as grades [3][4]. The array will

State the ways to construct container taxonomy There are several ways that we could construct our container taxonomy from here; one way that works well is to make a fundamental

Merging 4 sorted files having 50, 10, 25 and 15 records will take time  O (100)

The advantage of list over Arrays is flexibility. Over flood is not a problem until the computer memory is bushed. When the individual record are quite large, it may be difficult t

Define File organization''s and it''s types

A binary search tree is constructed through the repeated insertion of new nodes in a binary tree structure. Insertion has to maintain the order of the tree. The value to the lef

D elete a specific Node from Double Linked List as follows DELETEDBL(INFO, FORW, BACK, START, AVAIL,LOC) 1. [Delete Node] Set FORW [ BACK [LOC]]:= FORW[LOC]& BACK [FORW[

The Euclidean algorithm is an algorithm to decide the greatest common divisor of two positive integers. The greatest common divisor of N and M, in short GCD(M,N), is the largest in

Complexity classes All decision problems fall in sets of comparable complexity, called as complexity classes. The complexity class P is the set of decision problems which ca