🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: How Hashing Works: all 13 questions

Quiz: How Hashing Works · Question 5 of 13

What is the WORST-case time of a lookup in a basic chained hash table?

What is the WORST-case time of a lookup in a basic chained hash table?

  1. A.O(1)
  2. B.O(log n)
  3. C.O(n)
  4. D.O(n log n)
Answer & explanation

Correct answer: O(n)

If every key lands in the same bucket, a lookup scans a chain of n entries.

Can you get the rest right without peeking?

Take the timed Quiz: How Hashing Works quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →