卷別
資料結構與演算法
選擇國立臺灣大學 2026 · 考試 · 第 16 題
考科資料結構
(4 points) Assume that there are possible keys and hash table slots with . In double hashing, the probe sequence is
For a fixed key , we want the sequence to visit all table slots before repeating, so that insertion succeeds whenever the table is not full. Which of the following conditions is necessary and sufficient for this property (for that key )?
- (A)must be prime.
- (B)must be odd.
- (C).
- (D)The first hash function must be injective (one-to-one) from to .
- (E)None of the other choices.