What would be the worst case time to print all words and


Assignment

Suppose you are asked to write a program to count the frequency of occurrence of each word in a document.

Describe how you would implement your program using:

1. A hash table to store words and their frequencies.

2. An AVL tree to store words and their frequencies. For each of these implementations:

1. What would be the worst case time to populate the data structure with all the words and their frequencies?

2. What would be the worst case time to look up the frequency of a word?

3. What would be the worst case time to print all words and their frequencies, in alphabetical order of the words?

Assume there are n distinct words in the document, and a total of m words, and m is much greater than n.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: What would be the worst case time to print all words and
Reference No:- TGS02932484

Expected delivery within 24 Hours