Skip to content
Official PYQ · 2021

GATE CS 2021 Set 1 Q47 — Searching, Sorting, Hashing

Explain with AI

Consider a dynamic\textit{dynamic} hashing approach for 44-bit integer keys:

  1. There is a main hash table of size 44.
  2. The 22 least significant bits of a key is used to index into the main hash table.
  3. Initially, the main hash table entries are empty.
  4. Thereafter, when more keys are hashed into it, to resolve collisions, the set of all keys corresponding to a main hash table entry is organized as a binary tree that grows on demand.
  5. First, the 3rd3^{\text{rd}} least significant bit is used to divide the keys into left and right subtrees.
  6. To resolve more collisions, each node of the binary tree is further sub-divided into left and right subtrees based on the 4th4^{\text{th}} least significant bit.
  7. A split is done only if it is needed, i.e., only when there is a collision.

Consider the following state of the hash table.

Which of the following sequences of key insertions can cause the above state of the hash table (assume the keys are in decimal notation)?

Choose one option
View answer

Answer: C

Worked explanation not available yet.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Searching, Sorting, Hashing questions