Question: public class CS301LinearProbingHashST { private static final int INIT_CAPACITY = 16; private int N; // number of key-value pairs in the symbol table private int
public class CS301LinearProbingHashST
private static final int INIT_CAPACITY = 16;
private int N; // number of key-value pairs in the symbol table
private int M; // size of linear probing table
private K[] keys; // the keys
private V[] vals; // the values
private int putCount; // for experimental data collection
private int getCount; //
// create linear proving hash table of given capacity
@SuppressWarnings("unchecked")
public CS301LinearProbingHashST(int capacity) {
M = capacity;
keys = (K[]) new Object[M];
vals = (V[]) new Object[M];
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
