Official answer: C) 10, 9, 6, 7, 5, 13
Searching, Sorting and HashingLet each 4-bit key be represented as b4b3b2b1, where b1 is the least significant bit (LSB) and b4 is the most significant bit (4th LSB).
From the given hash table structure:
Index 00: Empty (no keys hashed to bucket 00).
Index 11: Exactly 1 key hashed to 11 (no split occurred).
Index 10: Exactly 2 keys hashed to 10, one having b3=0 and the other having b3=1 (causing a single split at level 1).
Index 01: Exactly 3 keys hashed to 01:
One key with b3=0 (left branch, no further split).
Two keys with b3=1, which collide on b3 and split on b4 into b4=0 and b4=1.
Let's evaluate the options by converting each key to 4-bit binary:
Option (A): Keys {5,9,4,13,10,7}
4=01002 hashes to bucket 00. However, bucket 00 is empty. Thus, (A) is incorrect.
Option (B): Keys {9,5,10,6,7,1}
Keys hashing to 01 are 9=10012 (b3=0), 5=01012 (b3=1), and 1=00012 (b3=0).
Here, two keys have b3=0 (9 and 1), which would cause the left subtree (b3=0) to split on b4. But in the given diagram, the right subtree (b3=1) is split. Thus, (B) is incorrect.
Option (C): Keys {10,9,6,7,5,13}
10=10102⟹ bucket 10, b3=0
6=01102⟹ bucket 10, b3=1 (two keys in 10, one with b3=0 and one with b3=1)
7=01112⟹ bucket 11, single key
9=10012⟹ bucket 01, b3=0
5=01012⟹ bucket 01, b3=1,b4=0
13=11012⟹ bucket 01, b3=1,b4=1
Keys 5 and 13 share b3=1 and split on b4, which perfectly matches the given tree at bucket 01.
Thus, (C) is correct.
Option (D): Keys {9,5,13,6,10,14}
6=01102, 10=10102, and 14=11102 all hash to bucket 10, requiring 3 keys and another split at 10, which does not match the diagram. Thus, (D) is incorrect.
Therefore, only (C) produces the given state.