Skip to content

    Hash Table

    Web design & developmentHash Map, Hashmap, Hash Table
    Reading time: 2 min.Editorially reviewed on:
    ← All terms

    Definition

    A hash table stores key-value pairs and uses a hash function to determine storage positions or buckets.

    When inserting or looking up, the key is hashed. Since different keys can map to the same target area, the data structure needs a collision strategy.

    Simply explained

    Like numbered drawers whose number is calculated from the key.

    Why it matters in practice

    Relevant for fast lookups, caches, indexes, and many internal data structures in software.

    Example from business

    A web service keeps frequently used configuration values in a hash map to quickly find them by key.

    Limits and pitfalls

    • Equating a hash table with cryptographic security; ignoring collisions; using poor hashing or inappropriate load factors.

    Origin & history

    Hash tables are among the classic data structures. Their practical implementation includes, among other things, chaining or open addressing for collision handling.

    Use in mid-sized companies

    • Possible application: caches, fast lookup tables, deduplicating sets, and in-memory indexes.

    Frequently asked questions

    Is a hash table sorted?

    Normally not by key order. Is lookup always O(1)? Often expected constant, worst-case depends on implementation and collisions.

    Sources

    • hash table · NIST Dictionary of Algorithms and Data Structures, hash table

    Sources checked on 10.10.2026.

    Editorially reviewed on:

    On this page

    Next step

    Put knowledge into practice