Data Structures19 sections · 729 units
Open in Course

Vocabulary - Hash Table

Key-value storage

A hash table (or hash map) stores key-value pairs with average O(1)O(1) operations:

  • Insert: add a key-value pair
  • Lookup: get the value for a key
  • Delete: remove a key-value pair
  • Contains: check if a key exists

A hash set is a simplified version that only stores keys (no values). It answers "is this element present?" in O(1)O(1).