Question: Implement a method or a piece of code using hashing techniques which stores some strings as names ( e . g . , ece ,

Implement a method or a piece of code using hashing techniques which stores some strings as names
(e.g.,ece,araz,ali,sara,...) in an array after generating a hashcode (index) for each name.
For example, if hashcode (sara)=8, it should be stored in index 8. If index 8 is already full,
collision management techniques should be used. The length of hash table (array) is up to you, but do
not choose it too big. The initial list of names should be read from an input file that contains
353 lines. In this file, each line contains two names as vertices, and an integer value as edge
weight between two vertices. Your program should also be able to search a given string in the
array in constant time using hashing techniques (not linear search) and return the index of array
containing this name, or -1 if the name does not exist in the array.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!