Coders Packet

CHAIN HASHING USING C++

By Alankrita Singh

In this C++ program Hashing function maps keys to value and chain hashing avoids collision of mapping two or more keys to the same value.

A hash table is created in which each cell of the hash table point to a linked list of records that have the same hash function value.

The Hash table has an N number of buckets.

To insert a key into the hash table insert function is used.

The user is asked to give the input for the size and the elements of the array.

The Hash position is found out using the solution function.

delete function is used to delete a node from the hash table.

The element to be deleted is asked from the user.

To delete, the hash position for the key is calculated, moving to the bucket corresponding to the calculated position we search the list in that particular bucket to find and remove the node with the key.

display function is used to print a new hash table after deletion.

 

 

Download project

Reviews Report

Submitted by Alankrita Singh (alankrita2420)

Download packets of source code on Coders Packet