資料結構›Ch8 雜湊
第 7 題/共 37 題
◀ DS 7/37
7. Linear Probing、Hashing、Binary Tree
#DS-08-007中Linear ProbingHashingBinary Tree

(單選)Given a list of binary trees T={t1,t2,…,t7}T = \{t_1, t_2, \ldots, t_7\} where each node is 0 or 1 shown as below, we would like to insert these trees into a linear-probing hash table of length N=11N = 11. The hash function f(t)=g(h(t)) mod Nf(t) = g(h(t)) \bmod N, where h(t)h(t) is the binary sequence obtained from in-order traversal of tree tt and g(⋅)g(\cdot) converts a binary sequence to a decimal number. For instance, g("1111111")=127g(\text{"1111111"}) = 127. Here's the question: how many collisions occur during the insertion process?

題目附圖
📄 台大112
跳轉到第題
▤完整推導請見《WH 資工筆記 · 資料結構》Ch8 雜湊
本章題號 · 1–20 / 37