Question: In Java Use a ChainedHashTable of Pairs and use it to count frequencies of words in Pride and Prejudice. Create a Pair class with two
In Java
-
Use a ChainedHashTable of Pairs and use it to count frequencies of words in Pride and Prejudice.
-
Create a Pair class with two members: T key and S value.
-
Create a ChainedHashTable of Pair's. In your Main class's static main method, fill the HashTable with the first N words in Pride and Prejudice. Each word should be paired with its frequency, the number of times it appears in the book. Please leave punctuation in (so the third paragraph contains the words Bennet," whereas the fourth paragraph contains the word Bennet).
-
Measure the time it takes to fill the HashTable where N = 10,000, 20,000, 40,000, and 80,000.
-
What is the complexity of adding N word-frequency Pairs (with duplicates) to a HashTable? Refer to the timing results to justify your answer.
-
-
Use your main method to print the words husband, wife, Elizabeth, and Darcy and their frequencies in the entire book (where they appear without punctuation).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
