CS FundamentalsVery hardGATE CS · DBMS

Extendible hashing uses the LOWEST-order bits of a key's binary value, bucket capacity 2, and starts with global depth 0 and one empty bucket. A full bucket splits on its next bit; the directory doubles only when the splitting bucket's local depth equals the global depth (repeat splits if needed). After inserting 21, 39, 55, 10, 8, 25, 56 in this order, what are the global depth and the number of distinct buckets?

  1. A. Global depth 3, 4 buckets
  2. B. Global depth 2, 5 buckets
  3. C. Global depth 1, 4 buckets
  4. D. Global depth 2, 4 buckets

Correct answer: D. Global depth 2, 4 buckets

Tracing the low-order bits: the directory grows to 2^2 = 4 entries, but buckets that never split stay shared by several entries, so only 4 distinct buckets exist.

More DBMS and SQL questions

Exams that ask this topic