Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Add to the LinearProbingHashST class the following methods in a java program: one named sameValueCount(V value) that count and print how many words occur once
- Add to the LinearProbingHashST class the following methods in a java program:
- one named sameValueCount(V value) that count and print how many words occur once and then again how many words occur 6 times.
- one named clusterCount() that computes and returns a count of the number of clusters in the hash table;
- one named maxClusterSize() that computes and returns the size of the largest cluster in the hash table;
- Add to the SeparateChainingHashST class the following methods:
- one named sameValueCount(V value) that count and print how many words occur once and then again how many words occur 6 times.
- one named chainCount that computes and returns a count of the number of chains (linked lists) in the hash table;
- one named maxChainSize() that computes and returns the size of the largest chain in the hash table;
Test these changes by writing an application program called Test.java that creates two hash tables, one of each type of those above. For both hash table, print the number of unique words, the number of words that occur exactly six times, the number of clusters and chains, and the size of the maximum chain and cluster
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started