[理工] 資結DS-tree 已刪文

看板Grad-ProbAsk作者 (wskgfrswklfsefaqjeaadsa)時間7年前 (2018/10/06 12:58), 7年前編輯推噓8(808)
留言16則, 3人參與, 7年前最新討論串1/1
The number of paths from the root node to the leaf nodes is proportional to t he number of nodes in the tree 這句話有錯嗎?對某個點來說path是唯一的,但對tree來說點越多path不是就越多嗎? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.241.215.95 ※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1538801906.A.4D0.html

10/06 13:05, 7年前 , 1F
Skew 點越多 還是一條啊
10/06 13:05, 1F
不同點path不算不同條嗎

10/06 13:32, 7年前 , 2F
"the" leaf應該只看特定leaf吧,感覺是要問樹高是不是跟n
10/06 13:32, 2F

10/06 13:32, 7年前 , 3F
ode數成正比的意思
10/06 13:32, 3F

10/06 13:34, 7年前 , 4F
借版問一下,二元樹的三種遞迴traversal(前/中/後序)的
10/06 13:34, 4F

10/06 13:34, 7年前 , 5F
複雜度為什麼是O(n)
10/06 13:34, 5F

10/06 14:00, 7年前 , 6F
skewed是跟點數正比(n),但full就不是吧(log n),可能是
10/06 14:00, 6F

10/06 14:00, 7年前 , 7F
這個意思?
10/06 14:00, 7F
※ 編輯: a0953781935 (27.246.103.253), 10/06/2018 14:01:57

10/06 14:05, 7年前 , 8F
回覆S大 時間複雜度通常看比較或是交換次數 但走訪沒
10/06 14:05, 8F

10/06 14:05, 7年前 , 9F
有 所以是看輸出次數 n個點輸出n次 所以O(n) 我是這
10/06 14:05, 9F

10/06 14:05, 7年前 , 10F
樣想的 有錯再請各位糾正
10/06 14:05, 10F

10/06 14:16, 7年前 , 11F
數學的話 遞迴是T(n)=2T(n/2)+1 用master就看的出
10/06 14:16, 11F

10/06 14:16, 7年前 , 12F
來了
10/06 14:16, 12F

10/06 14:37, 7年前 , 13F
回原po 他題目是問 從root到leaf
10/06 14:37, 13F

10/06 19:53, 7年前 , 14F
了解了感謝silence大
10/06 19:53, 14F

10/06 22:05, 7年前 , 15F
原po知道答案嗎,題目如果想問成正相關應該是true,如果
10/06 22:05, 15F

10/06 22:05, 7年前 , 16F
是問成正比好像就像befdawn大講的應該是false了
10/06 22:05, 16F
文章代碼(AID): #1Rk43oJG (Grad-ProbAsk)