看板 Grad-ProbAsk 關於我們 聯絡資訊
※ 引述《nonagoner (哈)》之銘言: : 題目在此 : http://tinyurl.com/bvoab5 : 問接續第4題的第5題 不知如何寫起 : 還有如果對第3題有想法的可以分享一下嗎~ : 5.continue question 1. If we need to traversal the tree inorder and : "each node can only be read once", please write down this inorder : traversal pseudo code for this self-defined binary tree. : 拜託高手解惑~感恩 我想順便請問一下第二題要怎樣有系統的討論... 有什麼比較好的切入點嗎 ? 像第一個tree 可以知道F一定是R E一定是B 不然要rotation E是B 表示C做過color change 所以C是 R D是B rootA 一定是B B應該是R -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.126.125.176 ※ 編輯: EntHeEnd 來自: 59.126.125.176 (02/07 22:51) ※ 編輯: EntHeEnd 來自: 59.126.125.176 (02/07 22:57)
nonagoner:我是一個一個插入判斷紅黑而結構不平衡的就無法符合該圖 02/07 22:57
可以給一個例子嗎 是找到一個合理的著色法就好了 還是要弄一個insert過程 一邊insert 一邊做調整 最後要長成那個樣子 還要符合Red-black tree 性質... ※ 編輯: EntHeEnd 來自: 59.126.125.176 (02/07 23:02)
EntHeEnd:第二棵 tree 是不是不可能阿 02/07 23:06
EntHeEnd:第三棵也不可能 02/07 23:07
EntHeEnd:B應該是B才對... 02/07 23:17