Binary tree transformation using rotations

前端 未结 2 2002
北恋
北恋 2021-01-13 08:16

While i was studying for midterm about binary trees, i found a statement that any arbitrary n-node binary tree can be transformed into any other n-node binary tree with at m

2条回答
  •  清歌不尽
    2021-01-13 08:54

    If the statement refers to binary trees not BST trees I think the statement is valid, since there is not restriction about the order of the nodes. And a simple mathematical induction should prove the statement.

提交回复
热议问题