🎙 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 10 of 13

In linear probing, what happens when the computed bucket is already taken?

In linear probing, what happens when the computed bucket is already taken?

  1. A.The new key replaces the old one
  2. B.Try the next bucket, then the next, wrapping around, until a free one is found
  3. C.A linked list is created in that bucket
  4. D.The table is cleared and rebuilt
Answer & explanation

Correct answer: Try the next bucket, then the next, wrapping around, until a free one is found

Lookups follow the same path, so a key is found by probing from its home bucket.

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 →