Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

Recognize the power of service guarantees.

Answered: 1 week ago