Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this project Please use c language and right the full code , and do not use prohibited elements like PERROR or EXIT _ FAILURE

In this project Please use c language and right the full code ,and do not use prohibited elements like PERROR or EXIT_FAILURE or regex and double pointers and let it be as a student level code 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:1. Input Data: Text files containing text data (the file may contain more than one line).2. 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 youknow, the word may consist from one letter only.3. Building the AVL Tree: As words are read from the file, insert each word into the AVL treewith frequency equals to 1, if the word already exists, update its frequency (counter).4. Insert a word to the AVL tree: insert a new word or update the frequency of existing word.5. 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.6. Display words: print the words and their frequencies using in-order traversal.7. 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.8. Collision handling: implement collision handling in the hash table (feel free to use any methodyou learned in this course)9. Search: Allow users to search for a word and retrieve the frequency of that word directly fromthe hash table.10. Insert a Word to the Hash Table: insert a new word in the hash table or update the frequencyof existing wors.11. 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.12. 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:1. Load data from the file.2. Create the AVL tree.3. Insert a word to the AVL tree.4. Delete a word from the AVL tree.5. Print the words as sorted in the AVL tree.6. Create the Hash Table.7. Insert a word to the Hash table.8. Delete a word from the hash table.9. Search for a word in the hash table and print its frequency.10. Print words statistics.11. Exit the application.

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_2

Step: 3

blur-text-image_3

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

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions

Question

Is it clear what happens if an employee violates the policy?

Answered: 1 week ago