[問題] 資料結構中的紅黑樹問題
老師講完AVL數就沒了,
做考古題發現考了紅黑樹問題。
不知各位前輩輩可否解惑
For red-black tree
a.if a black element has only one child,that child must be a red leaf.why?
b.if a red element has any children,it must have two children and
they must be black why
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.166.59.5
→
02/18 23:31, , 1F
02/18 23:31, 1F
推
02/19 00:15, , 2F
02/19 00:15, 2F
→
02/19 00:16, , 3F
02/19 00:16, 3F
→
02/19 00:16, , 4F
02/19 00:16, 4F
→
02/19 00:17, , 5F
02/19 00:17, 5F
→
02/19 22:03, , 6F
02/19 22:03, 6F