作者christensen ()
看板Grad-ProbAsk
标题[理工] 资结请教!谢谢!
时间Fri Apr 3 16:28:12 2009
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
1F:推 fish0835:A(2,n)=2n+3 => A(2,3)=9 04/03 16:31
2F:→ fish0835:2.a的意思是说 BS的作法是Sort之後再做search 04/03 16:33
3F:→ fish0835:问题是问 search 69中间有什麽data会被search到 04/03 16:34
4F:→ fish0835:答案是42,75,69 04/03 16:37
5F:→ fish0835:2b.Hash table为: 42,34, ,69, ,82,16,95,27,9,75 04/03 16:41
6F:→ fish0835:我应该没误解他的意思...Orz 04/03 16:43