5. Coding a hashMap #
Created Wednesday 19 February 2020
- We will make a hashMap class, with string as key, as we don’t have a hash function for every data type. The value will be a template. hashCode depends only on the key.
- As we are using seperate chaining. So our bucket array is an array of pointers to an LL of the value nodes.
- We will also store size, bucketCapacity;
Functions:
- void insert(string key, V value);
- V getValue(string key);
- V remove(string key);