One More Class Template Example
- A hash table is an abstract data type like an array
- A hash table uses a function that converts a key
value into an index that is used with an array of values
- The hash table function should be simple and fast to
different hash table keys may produce the same index. That is
referred to as a collision. Collisions may be resolved
programmatically or not.
- Hash tables are usually very fast for look-ups
Example 14-1 - First Hash Table
Example 14-2 - Use a hash table
to store a dictionary and play a game
Hash Table Questions
- What makes one hash table better than another?
- How do you design a good hash table?
you are going to use a hash table to manage a data base application,
such as DeAnza student data. How would you design the hash?