Software Engineer (SDE)dsaintermediate3 interactive MCQs in app
Collision Resolution Strategies
separate chaining vs open addressingload factor resizing threshold (~0.75)tombstone marker requirement on open-addressing delete
Core Concept
Hash collisions occur when two distinct keys map to the same bucket index (`hash(k1) % capacity == hash(k2) % capacity`). Two core fixes: **Separate Chaining** (each bucket holds a linked list/array of entries; degrades gracefully past load factor 0.75) and **Open Addressing** (Linear/Quadratic Probing inside the flat table array using tombstones on delete so probe searches don’t stop prematurely!). To preserve O(1) expected time, rehash into a `2x` table whenever load factor `size / capacity > 0.75`.
Worked Example
if keys `2` and `7` both hash to bucket `2`, linear probing stores `2` at `2` and `7` at `3`—deleting `2` must write `TOMBSTONE` at slot `2` so searching `7` continues probing to slot `3`!
Common Pitfall
setting a deleted slot directly to `EMPTY` in Open Addressing breaks searches for keys probed right after it!
Recommended Readings & Practice
Practice Collision Resolution Strategies with 3 graded MCQs & written feedback.
Take SOARDO’s free 12-question diagnostic to see how strong you are across your target role and unlock adaptive daily missions.