Coarse Open Addressing

Intermediate Algorithms and Data Structures English
Also available: Deutsch
Created by Best · 16.08.2026 at 09:13 UTC

Open addressing stores entries directly in the table and searches for alternative slots in case of collisions (linear, quadratic, double hashing). Deleting requires placeholders (tombstones).

Good locality, but sensitive to high load factors.

Diagram
Strategy Where the entry sits Deletion
Chaining inside the bucket structure local in the chain
Open addressing later slot in the table needs a tombstone
## Where used

High-performance maps, some DB hash indices, when pointer chasing from chaining is too expensive. More probing logic, better cache locality with good load.

Depth

In open addressing, all entries are stored directly in the table array. If the starting position is occupied, the search follows a predetermined probing sequence. Insertion and lookup must use exactly the same sequence, otherwise existing keys may be overlooked.

During deletion, a special marker is often set. A truly empty space indicates that a key cannot continue along this search path. However, a deletion marker allows for the continuation of probing and can be reused later during an insertion.

Difficulty levels

  1. Simulate linear probing for a short table.
  2. Semantically distinguish between empty slots and deletion markers.
  3. Explain clustering and its impact on access time.

Pitfalls

A nearly full table can generate very long probing sequences. If the search fails after the first deleted slot, keys placed further back remain invisible.

University approvals: 0
Tasks
Question 1

Why are tombstones necessary in open addressing?

Question 2

A search encounters a deletion marker after several occupied fields. What should it do?

Question 3

Implement the i-th linear probing step from start.

Hint

For a circular index, Math.floorMod(value, capacity) is suitable. This way, negative intermediate values remain valid.

Starter code is prefilled; replace TODO blocks with your solution.
1 test case will be used for grading
Run checks runtime behavior only. Final correctness is evaluated when you submit.
Card Info
  • Topic: Algorithms and Data Structures
  • Difficulty: Intermediate
  • Completed: 0 users
Creator
Best
Best
BestBuddy