三种写法,你更喜欢哪一种呢?
Python/Java/C++/Go/JS 代码:
98. 验证二叉搜索树 https://leetcode.cn/problems/validate-binary-search-tree/solution/qian-xu-zhong-xu-hou-xu-san-chong-fang-f-yxvh/
课后作业:
700. 二叉搜索树中的搜索 https://leetcode.cn/problems/search-in-a-binary-search-tree/
938. 二叉搜索树的范围和 https://leetcode.cn/problems/range-sum-of-bst/
530. 二叉搜索树的最小绝对差 https://leetcode.cn/problems/minimum-absolute-difference-in-bst/
2476. 二叉搜索树最近节点查询 https://leetcode.cn/problems/closest-nodes-queries-in-a-binary-search-tree/
501. 二叉搜索树中的众数 https://leetcode.cn/problems/find-mode-in-binary-search-tree/
230. 二叉搜索树中第 K 小的元素 https://leetcode.cn/problems/kth-smallest-element-in-a-bst/
1373. 二叉搜索子树的最大键值和 https://leetcode.cn/problems/maximum-sum-bst-in-binary-tree/
105. 从前序与中序遍历序列构造二叉树 https://leetcode.cn/problems/construct-binary-tree-from-preorder-and-inorder-traversal/
106. 从中序与后序遍历序列构造二叉树 https://leetcode.cn/problems/construct-binary-tree-from-inorder-and-postorder-traversal/
889. 根据前序和后序遍历构造二叉树 https://leetcode.cn/problems/construct-binary-tree-from-preorder-and-postorder-traversal/
1110. 删点成林 https://leetcode.cn/problems/delete-nodes-and-return-forest/
【基础算法精讲】题目+题解汇总:
https://github.com/EndlessCheng/codeforces-go/blob/master/leetcode/README.md