[理工] [資結]-Hashing

看板Grad-ProbAsk作者 (123)時間14年前 (2010/02/25 22:25), 編輯推噓8(804)
留言12則, 7人參與, 最新討論串1/3 (看更多)
Which of the following is true? A) Hashing technique enables to perform operations of search,insert and delete in the same expected time B) Hashing is an efficient technique in applications of both searching and sorting. C) Implementing stack using circular list enables efficent handling of the "stack full" condition D) The number of spanning trees of a graph with 7 nodes is 63 解答為C.....>"< 為何A錯阿~~~ 雜湊 search insert delete不是都是O(1)嗎ˊˋ 還有為什麼環狀的鏈結可以有效解決堆疊滿的問題,他的意思是說 比較容易偵測到stack何時為滿了嗎? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.138.105.159

02/25 22:27, , 1F
insert應該會有碰撞問題 應該不是O(1)
02/25 22:27, 1F

02/25 22:29, , 2F
既然是circular list就不會有stack full問題吧
02/25 22:29, 2F

02/25 22:30, , 3F
除非記憶體沒有空間了......
02/25 22:30, 3F

02/25 22:38, , 4F
hash有碰撞的話 三個的time 就可能不一樣
02/25 22:38, 4F

02/25 23:10, , 5F
D突然忘記怎麼算= ="
02/25 23:10, 5F

02/25 23:59, , 6F
當他是完全圖的話 n^(n-2)
02/25 23:59, 6F

02/26 09:29, , 7F
Hash的複雜度要用load factor來分析
02/26 09:29, 7F

02/26 09:30, , 8F
問題是在說他說的the same是指完全一樣 還是近似複雜度一樣
02/26 09:30, 8F

02/26 09:30, , 9F
完全一樣是不可能的 如果不容許插入相同元素,那插入之前
02/26 09:30, 9F

02/26 09:31, , 10F
一定要做search
02/26 09:31, 10F

02/26 14:59, , 11F
yahoo奇摩字典是你的好朋友
02/26 14:59, 11F

03/01 16:45, , 12F
文章代碼(AID): #1BXeXiNZ (Grad-ProbAsk)
文章代碼(AID): #1BXeXiNZ (Grad-ProbAsk)