View on GitHub

401-reading-notes

CLASS 30

Hash Tables

REVIEW, RESEARCH AND DISCUSS

What is a Hashtable?

How to hash?

hash = hashfunc(key)
index = hash % array_size

Internal Methods

add() adding a new key value pair to the hashtable

find() find the index by taking the key

contains() taking the taking will return boolean if exists

getHash() taking a key will hash and return index to put key