In a hash table with 'n' slots using chaining for collision resolution, what…
2026
In a hash table with 'n' slots using chaining for collision resolution, what is the average time complexity for search in the worst case ?
- A.
O(1)
- B.
O(log n)
- C.
O(n)
- D.
O(n^2)
Attempted by 82 students.
Show answer & explanation
Correct answer: C
In a hash table with chaining, worst-case search occurs when all 'n' keys collide into the same slot. This creates a linked list of length 'n', resulting in O(n) time complexity for search.