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 ?

  1. A.

    O(1)

  2. B.

    O(log n)

  3. C.

    O(n)

  4. 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.

Explore the full course: Niacl Ao It Specialist