Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are required to build a simple dictionary. Your program should read the words and its relevant meaning from a file named dictionary.txt. As well
You are required to build a simple dictionary. Your program should read the words and its relevant meaning from a file named dictionary.txt. As well as, the user should be able also to enter new words into the dictionary with their relevant meaning. Example: 26. Assist: help To keep track of the dictionary, a computer program based on a Hash Table data structure should be implemented. Write a program to help creating the dictionary by implementing the following operations: Read dictionary.txt file and create the dictionary. Hint: You can assume each line has one word with its meaning Search for a word and display its meaning, Update the meaning of an existing word. Insert a new word from the user with its meaning, Print all words in the dictionary with their associated meanings. Print the entire hash table including the empty slots. Delete a word from the dictionary. Print the number of occupied slots, hash table size and the load factor. Save all words back in file dictionary_modified.txt. Requirements: 1. For collision resolution, use two different methods from open addressing. You should be able to compare and explain the difference between them in terms of number of collisions occurred. So, give the user the option to choose which method. 2. If the load factor becomes larger than 65%, your program should perform a rehashing process. Bonus of 5 Points: if you search and implement another method for collision resolution provided that it was not explained in the lectures
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started