Hash tables can provide O(1) time for these operations
- insert(x)
- delete(x)
- contains(x)
but O(1) performance requires...
- The hash function is good and avoids many collisions
- The load factor (for open addressing or for separate chaining) is maintained at an acceptable value.
The following operations are not well supported by hash tables:
- findMin() or findMax() - that is, find the minimum or maximum key
- print or iterate in sorted order
In fact, the hash tables don't really require that the keys be comparable and so the findMin and findMax functions are typically omitted.