🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

Programming Concepts Intermediate

What is Hash Table?

A data structure that maps keys to values using a hash function, providing average O(1) time complexity for lookups, insertions, and deletions.

Hash tables compute a hash of the key to determine where to store the value in an array. Collisions (different keys mapping to same index) are handled by chaining (linked lists) or open addressing (probing nearby slots).

Hash tables power dictionaries (Python dict), objects (JavaScript), HashMaps (Java), and associative arrays (PHP). They are the most commonly used data structure for fast key-based lookups. Performance degrades with many collisions or high load factors.

Related Terms

Memoization
An optimization technique that caches function results for given inputs, avoiding redundant computations for repeated calls.
Composition over Inheritance
A design principle favoring object composition (has-a relationships) over class inheritance (is-a relationships) for code reuse.
Functional Programming
A programming paradigm that treats computation as the evaluation of mathematical functions, avoiding state changes and mutable data.
Debugging
The process of finding and fixing errors (bugs) in software code to ensure correct program behavior.
Observer Pattern
A design pattern where an object (subject) maintains a list of dependents (observers) that are notified automatically of state changes.
Big O Notation
A mathematical notation that describes the worst-case performance of an algorithm as input size grows.
View All Programming Concepts Terms →