← 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?
- A.The new key replaces the old one
- B.Try the next bucket, then the next, wrapping around, until a free one is found
- C.A linked list is created in that bucket
- 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 →