Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Give me the full code in c langhuge In this project, you will implement an application of AVL and Hash table In c languge. The

Give me the full code in c langhuge In this project, you will implement an application of AVL and Hash table In c languge. 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 (input.txt), consider ignoring all input except the alphabetical characters. "Hello" and "hello" should be considered the same word). As you know, 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 tree with frequency equals to 1, 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 word does not exist, then show a clear message about this.
Display words: print the words and their frequencies using in-order traversal.
Hash Table Creation: After building the AVL tree, traverse the tree and insert each word and its frequency into a hash table. The hash table will allow for fast retrieval of word frequency by direct access through the hash of the word.
Collision handling: implement collision handling in the hash table (feel free to use any method you learned in this course)
Search: Allow users to search for a word and retrieve the frequency of that word directly from the hash table.
Insert a Word to the Hash Table: insert a new word in the hash table or update the frequency of existing wors.
Delete word from the Hash Table: Search for a word in the hash table and delete it. If the word does not exist, then show a clear message about this.
Word Count Statistics: Provide statistics such as total number of unique words, most frequent word, 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.
The deadline for this assignment will be May 25th,2024(by 10:00 PM). LATE SUBMISSIONS will not be accepted for any reason. Before the discussion, please ensure your application runs properly on your laptop. Project discussions will be decided later.
Grading policy:
Your application should have all functionalities working properly.
Your application should contain a menu to allow the user to select which option (s) he would like to run.
Properly handling file, I/O errors, invalid user inputs, and edge cases in text editing operations.
image text in transcribed

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

More Books

Students also viewed these Databases questions

Question

10. What is meant by a feed rate?

Answered: 1 week ago