hashTable.put(1000012, customerKofi);
matchingCustomer = hashTable.get(1000012);
Collection Size | Search Time |
---|---|
10 (Ten) | TT |
1,000 (Thousand) | TT |
1,000,000 (Million) | TT |
1,000,000,000,000,000 (Quadrillion) | TT |
//Get (and return) the value associated with the parameter "key" get(key) //Put param "value" at param "key" into this hash table put(key, value)
//Big-O O(1) get(key) //Big-O O(1) put(key, value)
kofi@foo.com asha@here.com chin@here.com riya@there.com etc.
Arrayed list search is O(n) Linked list search is O(n)
var match;
match = anArray.get(2);
match = anArray.get(8922920220);
match = anArray.get(2908924);
//given key (e.g., "riya@hello.com") let index = this.convertKeyToIndex(key); let match = list.get(index)