aboutsummaryrefslogtreecommitdiffstats
path: root/HashTable.java
blob: e740928bafc6144247eb116fa82b994de2d45f2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
public abstract class HashTable {
    int capacity = 13;  // must be a prime number
    int size = 0;
    
    public int size() { 
        return size;
    }

    abstract boolean add(int o);        // only use integers since writing hashing algos is hard xD

    abstract boolean contains(int o);

    abstract boolean remove(int o);
}