Answered step by step
Verified Expert Solution
Link Copied!

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 (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.
In C language
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

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

More Books

Students also viewed these Databases questions

Question

3 > O Actual direct-labour hours Standard direct-labour hours...

Answered: 1 week ago

Question

2. What are the components of IT infrastructure?

Answered: 1 week ago