[理工] 紅黑樹

看板Grad-ProbAsk作者 (PTT領導)時間9年前 (2016/11/14 22:13), 編輯推噓2(205)
留言7則, 2人參與, 最新討論串1/4 (看更多)
http://imgur.com/a/oFpgR 右邊那個樹 是紅黑樹嗎 紅黑樹是balanced tree 可是我感覺它不是balanced tree 還是我搞錯定義了 balanced tree 的定義是什麼? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 125.224.41.243 ※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1479132810.A.F27.html

11/14 22:25, , 1F
紅黑樹的Balabce是看 black 是否一樣高
11/14 22:25, 1F

11/14 22:30, , 2F
無關子樹的高度是否一樣
11/14 22:30, 2F

11/15 16:41, , 3F
洪逸上課有說紅黑樹balance不是指本身balance 是指對應回
11/15 16:41, 3F

11/15 16:41, , 4F
去的234tree balance
11/15 16:41, 4F

11/15 16:43, , 5F
另外wiki: The balancing of the tree is not perfect, b
11/15 16:43, 5F

11/15 16:43, , 6F
ut it is good enough to allow it to guarantee searchi
11/15 16:43, 6F

11/15 16:43, , 7F
ng in O(log n) time
11/15 16:43, 7F
文章代碼(AID): #1OASQAyd (Grad-ProbAsk)
討論串 (同標題文章)
文章代碼(AID): #1OASQAyd (Grad-ProbAsk)