[理工] AVL Tree T/F

作者: x411066 (熱開水)   2020-01-02 18:06:58
您好,問題如下:
Which statement(s) is correct for an AVL Tree?
(1) The absolute value of the level difference of any two leaves is at most
one.
(2) The absolute value of the height difference of any two subtrees on the
same level is at most one.
(3) A deletion needs at most two rotation operations to preserve an AVL Tree
to be a height-balanced tree.
(4) After a new node is inserted, the tree height will not increase if
rotation operations are performed.
Ans: (D)
(1)反例 https://imgur.com/e5AyByL
作者: cossetannie (paa)   2020-01-02 18:10:00
你自己不就舉了一個
作者: zuchang (chang)   2020-01-02 18:10:00
8.30就是啊 再加同父點的話就對

Links booklink

Contact Us: admin [ a t ] ucptt.com