I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <typename K, typename V> | |
class HashTable | |
{ | |
/* | |
This is my implementation of a generic template class for | |
a hash table. Type K is the key-type, and V is the data. | |
This allows any object as the Key or Value. | |
This implemenation uses a 2D-array for the hash table, | |
implented with vectors of HashBucket objects. | |
The HashBucket objects hold and generate hash keys, as well |