Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are to implement 2 different hash tables, with different hashing functions. All of them should implement the following interface: public interface HashTable { public

You are to implement 2 different hash tables, with different hashing functions. All of them should implement the following interface:

public interface HashTable {

public void add(String key, V value);

public V remove(String key);

public V lookup(String key);

public Object[] getValuesList();

public void printReport();

}

The printReport() method should print to the console the following statistics: - The Load Fator, that is, the ratio of used to total number of buckets. - The longest chain in the table, that is, the maximum number of collisions for a particular bucket. - The Density Factor, that is, the ratio of elements stored elements to total number of buckets. - The Chaining Factor, that is, the average length of any chain in the table.

The 2 types of hashing functions you are to implement are: - Additive Hashing (Chaining) - XOR-Shift (Rotational) Hashing The hash tables should implement resizing and rehashing. The V[] getSortedList(V[] list) method should return a sorted list with all the elements in the array.

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

Genomes And Databases On The Internet A Practical Guide To Functions And Applications

Authors: Paul Rangel

1st Edition

189848631X, 978-1898486312

More Books

Students also viewed these Databases questions

Question

2. KMPG LLP

Answered: 1 week ago

Question

5. Wyeth Pharmaceuticals

Answered: 1 week ago