题目
My way
中序遍历用vector存储结果 + 按vector中结果依次构建树
1 | /** |
就地拼接 + 不使用额外空间复杂度
1 | /** |
Reference
https://leetcode-cn.com/problems/increasing-order-search-tree/solution/di-zeng-shun-xu-cha-zhao-shu-by-leetcode/
Just a Blog
1 | /** |
1 | /** |
https://leetcode-cn.com/problems/increasing-order-search-tree/solution/di-zeng-shun-xu-cha-zhao-shu-by-leetcode/