I have to implement a hash table which will use an array, however have to follow a guide and create functions for each procedure. I would appreciate if anyone could help out in completing this for me as I am having some trouble.
public class HashTable {
// public for testing purposes
public int buckets[];
public HashTable(long _a, long _c, long _m) {
}
public void insert(int key) {
}
}
What I've got so far:
public class HashTable {
// public for testing purposes
public int buckets[];
public HashTable(long _a, long _c, long _m) {
table = new Node[];
}
public void insert(int key) {
Node<T> newNode = new Node(key);
int posPosition = calPosition(key);
}
I have included what I have done so far. Maybe I'm going about it the wrong way. I understand the concept but cannot seem to write code for the hash table so far. Would appreciate any help, Thanks Again