Implement a hash map for string keys without using Map, Set or object properties as the storage. Store entries in an array of buckets, where each bucket is an array of [key, value] pairs (chaining).
Write the class ChainedMap with:
put(key, value): insert, or replace the value if the key existsget(key): the value, or undefined if absenthas(key): whether the key is present, even when its stored value is undefinedremove(key): delete the key, returning true if it was present and false otherwisesize: the number of entries (a property, kept up to date)capacity: the number of buckets (a property). It starts at 8. After an insertion that makes size greater than 0.75 * capacity, double the capacity and re-insert every entry
You choose the hash function. Make it spread keys out: a hash that sends everything to one bucket will make the large test time out.