首页
AI Coding
NEW
沸点
课程
直播
活动
AI刷题
APP
插件
搜索历史
清空
创作者中心
写文章
发沸点
写笔记
写代码
草稿箱
创作灵感
查看更多
会员
登录
注册
二叉树
goAhead
创建于2021-08-12
订阅专栏
二叉树
暂无订阅
共44篇文章
创建于2021-08-12
订阅专栏
默认顺序
默认顺序
最早发布
最新发布
21. 合并两个有序链表
题目介绍 力扣21题:https://leetcode-cn.com/problems/merge-two-sorted-lists/ 分析 给你输入两个有序链表,请你把他俩合并成一个新的有序链表,函
563. 二叉树的坡度
题目介绍 力扣563题:https://leetcode-cn.com/problems/binary-tree-tilt/ 分析 从问题的描述中,可以清楚地了解到,我们需要在给定树的每个结点处找到其
543. 二叉树的直径
题目介绍 力扣543题:https://leetcode-cn.com/problems/diameter-of-binary-tree/ 分析 该题跟之前的[124. 二叉树中的最大路径和]的思路是
530. 二叉搜索树的最小绝对差
题目介绍 力扣530题:https://leetcode-cn.com/problems/minimum-absolute-difference-in-bst/ 方法:中序遍历 考虑对升序数组 a 求
513. 找树左下角的值
题目介绍 力扣513题:https://leetcode-cn.com/problems/find-bottom-left-tree-value/ 方法一:递归 咋眼一看,这道题目用递归的话就就一直向
508. 出现次数最多的子树元素和
题目介绍 力扣508题:https://leetcode-cn.com/problems/most-frequent-subtree-sum/ 方法:后序遍历 由于要求出以当前节点为根的所有子树元素和
501. 二叉搜索树中的众数
题目介绍 力扣501题:https://leetcode-cn.com/problems/find-mode-in-binary-search-tree/ 方法:中序遍历 思路与算法 首先我们一定能想
450. 删除二叉搜索树中的节点
题目介绍 力扣450题:https://leetcode-cn.com/problems/delete-node-in-a-bst/ 分析 关于二叉树搜索树的常用操作无非就是判断,新增元素,查询元素,
337. 打家劫舍 III
力扣337题:https://leetcode-cn.com/problems/house-robber-iii/ 解法一、暴力递归 - 最优子结构 在解法一和解法二中,我们使用爷爷、两个孩子、4 个
331. 验证二叉树的前序序列化
题目介绍 力扣331题:https://leetcode-cn.com/problems/verify-preorder-serialization-of-a-binary-tree/ 分析 利用二叉
235. 二叉搜索树的最近公共祖先
题目介绍 力扣235题:https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-search-tree/ 分析 这题让求
124. 二叉树中的最大路径和
题目介绍 力扣124题:https://leetcode-cn.com/problems/binary-tree-maximum-path-sum/ 分析 思路 路径每到一个节点,有 3 种选择:1.
106. 从中序与后序遍历序列构造二叉树
题目介绍 力扣106题:https://leetcode-cn.com/problems/construct-binary-tree-from-inorder-and-postorder-traver
105. 从前序与中序遍历序列构造二叉树
题目介绍 力扣105题:https://leetcode-cn.com/problems/construct-binary-tree-from-preorder-and-inorder-travers
117. 填充每个节点的下一个右侧节点指针 II
题目介绍 力扣117题:https://leetcode-cn.com/problems/populating-next-right-pointers-in-each-node-ii/ 分析 其实这道
116. 填充每个节点的下一个右侧节点指针
题目介绍 力扣116题:https://leetcode-cn.com/problems/populating-next-right-pointers-in-each-node/ 分析 题目的意思就是
257. 二叉树的所有路径
题目介绍 力扣257题:https://leetcode-cn.com/problems/binary-tree-paths/ 方法一:递归 + 回溯 首先我们可以知道,找到了叶子节点,也就找到了一条
199. 二叉树的右视图
题目介绍 力扣199题:https://leetcode-cn.com/problems/binary-tree-right-side-view/ 方法一:BFS或者层序遍历 参考[102. 二叉树的
173. 二叉搜索树迭代器
题目介绍 力扣173题:https://leetcode-cn.com/problems/binary-search-tree-iterator/ 分析 我们可以直接对二叉搜索树做一次完全的递归遍历,
下一页