[理工] [DS] 高等樹Rotation問題
After inserting a new node to an AVL tree, at most two rotations are
needed to re-blanced the tree.
答案給這個敘述是 錯的
但不管是RR.RL.LR.LL哪種case最多都是兩次rotation不是嗎?
還是我誤會題目的意思了
另外若將AVL tree改成Red-Black tree 也是錯的嗎?
以上兩題請教各位
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.33.188.58
推
02/09 00:27, , 1F
02/09 00:27, 1F
→
02/09 00:29, , 2F
02/09 00:29, 2F
推
02/09 00:38, , 3F
02/09 00:38, 3F
→
02/09 00:39, , 4F
02/09 00:39, 4F
推
02/09 00:43, , 5F
02/09 00:43, 5F
→
02/09 01:11, , 6F
02/09 01:11, 6F