[理工] [資結]-成大100-電機
http://0rz.tw/MInEZ
想問一下Hash table問題
9.Given a hash table of 11 buckets , labbled from 0 to 10. Each bucket can
hold one key. The hash function h(key) = key % 11.Chaining is used in the
hash scheme.Now,Supose the hash is initially empty and then the numbers
"3,41,15,36,74,58,91,45,48,64"are hashed sequentially into the hash table.
(2)What are the average comparisons if each number of the sequence is
looked up once?
請問這題的average comparison是要比較甚麼?
(3)Hashing 的worst case 是O(n)嗎?
(4)要怎樣才能使Hashing達到O(logn)?
對Hashing不是很了解Orz
麻煩請高手解答了
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 175.98.50.200
推
01/31 13:09, , 1F
01/31 13:09, 1F
→
01/31 13:11, , 2F
01/31 13:11, 2F
→
01/31 14:05, , 3F
01/31 14:05, 3F
→
01/31 14:55, , 4F
01/31 14:55, 4F
→
01/31 14:55, , 5F
01/31 14:55, 5F
→
01/31 16:53, , 6F
01/31 16:53, 6F
→
01/31 19:06, , 7F
01/31 19:06, 7F