← 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?
- A.O(1)
- B.O(log n)
- C.O(n)
- 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 →