Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 2: Dictionary Data Type Marks [50] Dictionary is a useful data structure which can save data associated with a given key where key can

image text in transcribedimage text in transcribed

Task 2: Dictionary Data Type Marks [50] Dictionary is a useful data structure which can save data associated with a given key where key can be alphanumeric. Your task is to develop a telephone book dictionary which uses person name as a key and stores his/her phone number. For hash map, you can create an array of your own struct which have a string of name and an int of phone number as shown below. Name: Mike Name: Bob Name: Ahmad Phone: 2312145 Phone: 2300244 Phone: 2374122 You should use name as a hash key to create a hash value. Your program should have insert, delete, and search functions. For your ease you may use names in lowered case with size up to 10 characters. Implement the hash map using closed hasing. Task 3: Open Hashing Marks [20] Modify the previous task and use chaining to save data. Implement the hash table that uses buckets( a combination of an array and a linked list). Each element in the array (the hash table) should be the header for a linked list. All elements that hash into the same location will be stored in the list. Implement insert, delete, and search functions. Task 2: Dictionary Data Type Marks [50] Dictionary is a useful data structure which can save data associated with a given key where key can be alphanumeric. Your task is to develop a telephone book dictionary which uses person name as a key and stores his/her phone number. For hash map, you can create an array of your own struct which have a string of name and an int of phone number as shown below. Name: Mike Name: Bob Name: Ahmad Phone: 2312145 Phone: 2300244 Phone: 2374122 You should use name as a hash key to create a hash value. Your program should have insert, delete, and search functions. For your ease you may use names in lowered case with size up to 10 characters. Implement the hash map using closed hasing. Task 3: Open Hashing Marks [20] Modify the previous task and use chaining to save data. Implement the hash table that uses buckets( a combination of an array and a linked list). Each element in the array (the hash table) should be the header for a linked list. All elements that hash into the same location will be stored in the list. Implement insert, delete, and search functions

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

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions

Question

What do they do well?

Answered: 1 week ago

Question

Move smoothly from point to point

Answered: 1 week ago