8. Hashing - II
In this lab we continue implementing our own data structure library.
You will implement the following UML in Java:
8.1. Hashing - HashTableOpen
Create the structure of the generic class
HashTableOpen
.It contains five data fields.
Implement the constructor
HashTableOpen()
.Implement the methods
int find(K key)
andvoid rehash()
Implement all the function from the interface.
Create the structure of the generic class
HashTableOpenQuad
inheriting fromHashTableOpen
.Override the method
int find(K key)
Make sure that your code works.
8.2. Hahsing - HashTableOpenDouble
Create the generic class
HashTableOpenDouble
.Implement the methods
int hash2(K key)
,int nextPrime(int n)
andboolean isPrime(int n)
.Override the method
int find(K key)
.Make sure that your code works.
ENSURE WE HAVE RECORDED YOUR COMPLETION. FAILURE TO DO SO WILL RESULT IN A GRADE OF 0!