二叉树 专项

https://leetcode-cn.com/tag/binary-tree/problemset/
把题目的要求细化,搞清楚根节点应该做什么,然后剩下的事情抛给前/中/后序的遍历框架就可以

226.翻转二叉树(简单)

https://leetcode-cn.com/problems/invert-binary-tree

114.二叉树展开为链表(中等)

https://leetcode-cn.com/problems/flatten-binary-tree-to-linked-list

116.填充每个节点的下一个右侧节点指针(中等)

https://leetcode-cn.com/problems/populating-next-right-pointers-in-each-node

654.最大二叉树(中等)

https://leetcode-cn.com/problems/maximum-binary-tree/

*105.从前序与中序遍历序列构造二叉树(中等)

https://leetcode-cn.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/

*106.从中序与后序遍历序列构造二叉树(中等)

https://leetcode-cn.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/

94.二叉树的中序遍历 (简单) [递归以及非递归实现]

https://leetcode-cn.com/problems/binary-tree-inorder-traversal/

95.验证二叉搜索树(中等)

https://leetcode-cn.com/problems/validate-binary-search-tree/ #⚠️ 这道题辅助方法里面要传入lower,upper两个值,否则会有问题;或者直接用中序遍历来实现

100.相同的树 (简单)

https://leetcode-cn.com/problems/same-tree/

101. 对称二叉树(简单)

https://leetcode-cn.com/problems/symmetric-tree/

104. 二叉树的最大深度(简单)

https://leetcode-cn.com/problems/maximum-depth-of-binary-tree/

111. 二叉树的最小深度(简单)

https://leetcode-cn.com/problems/minimum-depth-of-binary-tree/
注意递归终止条件

112. 路径总和(简单)

https://leetcode-cn.com/problems/path-sum/
注意叶子结点这个定义 (与111类似)

404. 左叶子之和(简单)

https://leetcode-cn.com/problems/sum-of-left-leaves/

144. 二叉树的前序遍历(简单)

https://leetcode-cn.com/problems/binary-tree-preorder-traversal/

145. 二叉树的后序遍历(简单)

https://leetcode-cn.com/problems/binary-tree-postorder-traversal/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

猴猴猪猪

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值