作者gn00618777 (123)
看板Grad-ProbAsk
標題[理工] [資結]-Hashing
時間Thu Feb 25 22:25:46 2010
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
推 chenbojyh:insert應該會有碰撞問題 應該不是O(1) 02/25 22:27
推 chenbojyh:既然是circular list就不會有stack full問題吧 02/25 22:29
→ chenbojyh:除非記憶體沒有空間了...... 02/25 22:30
推 crazyjoe:hash有碰撞的話 三個的time 就可能不一樣 02/25 22:38
推 assassin88:D突然忘記怎麼算= =" 02/25 23:10
推 sodas2002:當他是完全圖的話 n^(n-2) 02/25 23:59
推 FRAXIS:Hash的複雜度要用load factor來分析 02/26 09:29
→ FRAXIS:問題是在說他說的the same是指完全一樣 還是近似複雜度一樣 02/26 09:30
→ FRAXIS:完全一樣是不可能的 如果不容許插入相同元素,那插入之前 02/26 09:30
→ FRAXIS:一定要做search 02/26 09:31
推 yesmilo:yahoo奇摩字典是你的好朋友 02/26 14:59