Hash Table
A hash table (or hash map) is a data structure that maps keys to values using a hash function to compute an index into an array of buckets, giving average O(1) lookup, insertion, and deletion.
11 resources across 2 libraries
Glossary Terms(5)
Big O Notation
Big O notation is a mathematical notation used in computer science to describe how an algorithm's running time or memory usage grows as the size of its input i…
Linked List
A linked list is a linear data structure made up of nodes, where each node stores a value and a reference (pointer) to the next node in the sequence, allowing…
Binary Search Tree
A binary search tree (BST) is a node-based data structure in which each node has at most two children, and every node's left subtree contains only values less…
Hash Table
A hash table (or hash map) is a data structure that maps keys to values using a hash function to compute an index into an array of buckets, giving average O(1)…
Memoization
Memoization is an optimization technique that caches the results of expensive function calls so that when the same inputs occur again, the cached result is ret…
Interview Questions(6)
What is a Hash Table?
A hash table is a data structure that maps keys to values using a hash function to compute an index into an array of buckets, giving average O(1) insertion, lo…
What is a Hash Collision?
A hash collision occurs when two different keys are mapped by a hash function to the same bucket or index in a hash table, which is mathematically inevitable o…
Solve the Two Sum Problem
The optimal solution to Two Sum scans the array once while keeping a hash map of value to index, checking on every element whether its complement (target minus…
What is Hashing with Chaining?
Hashing with chaining resolves hash collisions by storing every key that maps to the same bucket in a linked list (or dynamic array) attached to that bucket, s…
What is Hashing with Open Addressing?
Open addressing resolves hash collisions by keeping all entries directly inside the table's own array of slots, probing to a different slot (via linear, quadra…
What is an Inverted Page Table?
An inverted page table flips the usual mapping direction by keeping one entry per physical frame instead of one entry per virtual page, storing which process a…