修剪二叉搜索树[https://leetcode.cn/problems/trim-a-binary-search-tree/] 对于当前ro...

修剪二叉搜索树[https://leetcode.cn/problems/trim-a-binary-search-tree/] 对于当前ro...
将有序数组转换为二叉搜索树[https://leetcode.cn/problems/convert-sorted-array-to-binar...
深度优先搜索:从起始节点开始,沿着一条路径尽可能深地探索,直到无法继续,然后回溯到上一个节点,再选择另一条路径继续深入探索,以此类推,直到访问完...
满二叉树 满二叉树:每个节点都有0或2个子节点(即没有仅含 1 个子节点的节点);所有叶子节点都在同一层(树是完全平衡的,节点总数为2的数的高度...
前序遍历(中左右) 递归实现前序遍历 中序遍历(左中右) 递归实现中序遍历 后序遍历(左右中) 递归实现后序遍历 层次遍历(本质是广度优先搜索)
最大二叉树[https://leetcode.cn/problems/maximum-binary-tree/] 思路: 1. 数组内只有一个...
思路: 两颗二叉树,一颗为null,直接把另一颗二叉树的子树传递进去; 都不为null时,构造相应二叉树。/*** Definition for...
从中序与后序遍历序列构造二叉树[https://leetcode-cn.com/problems/construct-binary-tree-f...
二叉树的最近公共祖先[https://leetcode.cn/problems/lowest-common-ancestor-of-a-bina...
二叉搜索树的最近公共祖先[https://leetcode.cn/problems/lowest-common-ancestor-of-a-bi...