11 2024 档案

摘要:岛屿的数量 题目链接:https://leetcode.cn/problems/number-of-islands/ 此题目要点:dfs和bfs都可以解决此题,但是使用dfs代码会更加的简洁 首先对grid进行遍历,每一个节点都进行检查,判断是否是1(陆地) 如果是,则进行dfs深搜,并将所有搜到的 阅读全文
posted @ 2024-11-14 12:09 W-Vicky11 阅读(14) 评论(0) 推荐(0) 编辑
摘要:所有可达路径 文章链接:https://programmercarl.com/kamacoder/0098.所有可达路径.html#本题代码 题目链接:https://kamacoder.com/problempage.php?pid=1170 #include <iostream> #includ 阅读全文
posted @ 2024-11-13 16:26 W-Vicky11 阅读(4) 评论(0) 推荐(0) 编辑
摘要:669. 修剪二叉搜索树 文章链接:https://programmercarl.com/0669.修剪二叉搜索树.html 题目链接:https://leetcode.cn/problems/trim-a-binary-search-tree/description/ class Solution 阅读全文
posted @ 2024-11-10 20:55 W-Vicky11 阅读(40) 评论(0) 推荐(0) 编辑
摘要:235. 二叉搜索树的最近公共祖先 文章链接:https://programmercarl.com/0235.二叉搜索树的最近公共祖先.html 题目链接:https://leetcode.cn/problems/lowest-common-ancestor-of-a-binary-search-t 阅读全文
posted @ 2024-11-10 12:09 W-Vicky11 阅读(35) 评论(0) 推荐(0) 编辑
摘要:530.二叉搜索树的最小绝对差 文章链接:https://programmercarl.com/0530.二叉搜索树的最小绝对差.html 视频链接:https://www.bilibili.com/video/BV1DD4y11779/?vd_source=6cb513d59bf1f73f86d4 阅读全文
posted @ 2024-11-10 09:51 W-Vicky11 阅读(53) 评论(0) 推荐(0) 编辑
摘要:654.最大二叉树 文章链接:https://programmercarl.com/0654.最大二叉树.html 题目链接:https://leetcode.cn/problems/maximum-binary-tree/description/ class Solution { public: 阅读全文
posted @ 2024-11-09 16:47 W-Vicky11 阅读(68) 评论(0) 推荐(0) 编辑
摘要:513.找树左下角的值 文章链接:https://programmercarl.com/0513.找树左下角的值.html 题目链接:https://leetcode.cn/problems/find-bottom-left-tree-value/description/ 要点:不管是前中后序遍历, 阅读全文
posted @ 2024-11-08 21:48 W-Vicky11 阅读(75) 评论(0) 推荐(0) 编辑
摘要:110.平衡二叉树 文章链接:https://programmercarl.com/0110.平衡二叉树.html#题外话 题目链接:https://leetcode.cn/problems/balanced-binary-tree/description/ class Solution { pub 阅读全文
posted @ 2024-11-08 16:45 W-Vicky11 阅读(47) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示