previous | start | next

Summary

Hash tables can provide O(1) time for these operations

  1. insert(x)
  2. delete(x)
  3. contains(x)

but O(1) performance requires...

The following operations are not well supported by hash tables:

  1. findMin() or findMax() - that is, find the minimum or maximum key
  2. 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.



previous | start | next