Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this project, you will implement an application of AVL and Hash table. The application will efficiently index words found in a text file. The
In this project, you will implement an application of AVL and Hash table. The application will efficiently index words found in a text file. The application will use an AVL tree to maintain a balanced order of words for fast retrieval and sorting. Additionally, the words will be stored in a hash table for fast access. The project has the following features: Input Data: Text files containing text data the file may contain more than one line Reading Data: read words from a text file inputtxt consider ignoring all input except the alphabetical characters. "Hello" and "hello" should be considered the same word As youknow, the word may consist from one letter only Building the AVL Tree: As words are read from the file, insert each word into the AVL treewith frequency equals to if the word already exists, update its frequency counter Insert a word to the AVL tree: insert a new word or update the frequency of existing word Delete word from the AVL Tree: Search for a word in the AVL tree and delete it If the worddoes not exist, then show a clear message about this Display words: print the words and their frequencies using inorder traversal Hash Table Creation: After building the AVL tree, traverse the tree and insert each word andits frequency into a hash table. The hash table will allow for fast retrieval of word frequency bydirect access through the hash of the word Collision handling: implement collision handling in the hash table feel free to use any methodyou learned in this course Search: Allow users to search for a word and retrieve the frequency of that word directly fromthe hash table Insert a Word to the Hash Table: insert a new word in the hash table or update the frequencyof existing wors Delete word from the Hash Table: Search for a word in the hash table and delete it If theword does not exist, then show a clear message about this Word Count Statistics: Provide statistics such as total number of unique words, most frequentword, and words repeated more than specific threshold in the tree from the hash table. Your application must have the following menu: Load data from the file Create the AVL tree Insert a word to the AVL tree Delete a word from the AVL tree Print the words as sorted in the AVL tree Create the Hash Table Insert a word to the Hash table Delete a word from the hash table Search for a word in the hash table and print its frequency Print words statistics Exit the application.
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