看板 Grad-ProbAsk 關於我們 聯絡資訊
1. The Ackerman’s function A(m, n) is defined as follows. What is A(2, 3)? ┌ n+1, if m = 0 A(m,n)= { A(m -1,1), if n = 0 └ A(m -1, A(m, n -1)), otherwise 2.Given a data sequence: 82 16 9 95 27 75 42 69 34 (a) Considering the binary searching method, first sort the above data sequence andthen search data 69 (i.e., key). What is the searched data for each search pass? 這題是什麼意思啊? (b) For solving the collision problem in hashing search, what is the result of using linear probing (i.e., linear open addressing) ? Note: linear probing function: (h(key) + 1) mod N, h(key) = key mod N ; array size N = 11 (i.e., A[0] ~ A[10]) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.118.9.176
fish0835:A(2,n)=2n+3 => A(2,3)=9 04/03 16:31
fish0835:2.a的意思是說 BS的作法是Sort之後再做search 04/03 16:33
fish0835:問題是問 search 69中間有什麼data會被search到 04/03 16:34
fish0835:答案是42,75,69 04/03 16:37
fish0835:2b.Hash table為: 42,34, ,69, ,82,16,95,27,9,75 04/03 16:41
fish0835:我應該沒誤解他的意思...Orz 04/03 16:43