What is rehashing in the context of a Hash Table?

2025

What is rehashing in the context of a Hash Table?

  1. A.

    Changing the hash function

  2. B.

    Changing the keys

  3. C.

    Increasing the size of the hash table when it gets too full and then re-inserting all elements

  4. D.

    None of the above

Attempted by 227 students.

Show answer & explanation

Correct answer: C

Rehashing refers to increasing the size of the hash table when it gets too full (usually when the load factor exceeds a particular threshold), and then re-inserting all the elements.

Explore the full course: Cocubes Preparation