Skip to content

Commit 525da14

Browse files
authored
Create Readme.md
1 parent 7005ab2 commit 525da14

File tree

1 file changed

+3
-0
lines changed
  • Tree/897.Increasing-Order-Search-Tree

1 file changed

+3
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### 897.Increasing-Order-Search-Tree
2+
3+
典型的递归函数处理树的问题。抽象起来,increasingBST要做四件事情:1. 将左子树拉成一条直线;2.将根节点加在左子树(直线)的最后一个节点的右边;3.将右子树拉成一条直线;4. 将右子树拼接在原根节点的右边。最后返回的是新树的根。其中第一步和第三步就是increasingBST本身。

0 commit comments

Comments
 (0)