跳至主要內容

2.8 图


2.8 图

相关题目

图的深度优先搜索

题号标题题解标签难度力扣
797所有可能的路径深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window
200岛屿数量[✓]深度优先搜索 广度优先搜索 并查集 2+🟠🀄️open in new window 🔗open in new window
695岛屿的最大面积[✓]深度优先搜索 广度优先搜索 并查集 2+🟠🀄️open in new window 🔗open in new window
133克隆图[✓]深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window
494目标和[✓]数组 动态规划 回溯🟠🀄️open in new window 🔗open in new window
144二叉树的前序遍历[✓] 深度优先搜索 1+🟢🀄️open in new window 🔗open in new window
94二叉树的中序遍历[✓] 深度优先搜索 1+🟢🀄️open in new window 🔗open in new window
145二叉树的后序遍历[✓] 深度优先搜索 1+🟢🀄️open in new window 🔗open in new window
589N 叉树的前序遍历[✓] 深度优先搜索🟢🀄️open in new window 🔗open in new window
590N 叉树的后序遍历[✓] 深度优先搜索🟢🀄️open in new window 🔗open in new window
124二叉树中的最大路径和[✓] 深度优先搜索 动态规划 1+🔴🀄️open in new window 🔗open in new window
199二叉树的右视图[✓] 深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window
543二叉树的直径[✓] 深度优先搜索 二叉树🟢🀄️open in new window 🔗open in new window
662二叉树最大宽度[✓] 深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window
958二叉树的完全性检验[✓] 广度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window
572另一棵树的子树[✓] 深度优先搜索 二叉树 2+🟢🀄️open in new window 🔗open in new window
100相同的树[✓] 深度优先搜索 广度优先搜索 1+🟢🀄️open in new window 🔗open in new window
111二叉树的最小深度[✓] 深度优先搜索 广度优先搜索 1+🟢🀄️open in new window 🔗open in new window
841钥匙和房间深度优先搜索 广度优先搜索 🟠🀄️open in new window 🔗open in new window
129求根节点到叶节点数字之和[✓] 深度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window
323无向图中连通分量的数目 🔒深度优先搜索 广度优先搜索 并查集 1+🟠🀄️open in new window 🔗open in new window
684冗余连接深度优先搜索 广度优先搜索 并查集 1+🟠🀄️open in new window 🔗open in new window
802找到最终的安全状态深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window
785判断二分图深度优先搜索 广度优先搜索 并查集 1+🟠🀄️open in new window 🔗open in new window
886可能的二分法深度优先搜索 广度优先搜索 并查集 1+🟠🀄️open in new window 🔗open in new window
323无向图中连通分量的数目 🔒深度优先搜索 广度优先搜索 并查集 1+🟠🀄️open in new window 🔗open in new window
130被围绕的区域[✓]深度优先搜索 广度优先搜索 并查集 2+🟠🀄️open in new window 🔗open in new window
417太平洋大西洋水流问题深度优先搜索 广度优先搜索 数组 1+🟠🀄️open in new window 🔗open in new window
1020飞地的数量深度优先搜索 广度优先搜索 并查集 2+🟠🀄️open in new window 🔗open in new window
1254统计封闭岛屿的数目深度优先搜索 广度优先搜索 并查集 2+🟠🀄️open in new window 🔗open in new window
1034边界着色深度优先搜索 广度优先搜索 数组 1+🟠🀄️open in new window 🔗open in new window
剑指 Offer 13机器人的运动范围[✓]深度优先搜索 广度优先搜索 动态规划🟠🀄️open in new window
529扫雷游戏深度优先搜索 广度优先搜索 数组 1+🟠🀄️open in new window 🔗open in new window

图的广度优先搜索

题号标题题解标签难度力扣
797所有可能的路径深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window
286墙与门 🔒广度优先搜索 数组 矩阵🟠🀄️open in new window 🔗open in new window
200岛屿数量[✓]深度优先搜索 广度优先搜索 并查集 2+🟠🀄️open in new window 🔗open in new window
752打开转盘锁广度优先搜索 数组 哈希表 1+🟠🀄️open in new window 🔗open in new window
279完全平方数[✓]广度优先搜索 数学 动态规划🟠🀄️open in new window 🔗open in new window
133克隆图[✓]深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window
733图像渲染深度优先搜索 广度优先搜索 数组 1+🟢🀄️open in new window 🔗open in new window
54201 矩阵广度优先搜索 数组 动态规划 1+🟠🀄️open in new window 🔗open in new window
322零钱兑换[✓]广度优先搜索 数组 动态规划🟠🀄️open in new window 🔗open in new window
323无向图中连通分量的数目 🔒深度优先搜索 广度优先搜索 并查集 1+🟠🀄️open in new window 🔗open in new window
剑指 Offer 13机器人的运动范围[✓]深度优先搜索 广度优先搜索 动态规划🟠🀄️open in new window
199二叉树的右视图[✓] 深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window
662二叉树最大宽度[✓] 深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window
958二叉树的完全性检验[✓] 广度优先搜索 二叉树🟠🀄️open in new window 🔗open in new window
572另一棵树的子树[✓] 深度优先搜索 二叉树 2+🟢🀄️open in new window 🔗open in new window
100相同的树[✓] 深度优先搜索 广度优先搜索 1+🟢🀄️open in new window 🔗open in new window
111二叉树的最小深度[✓] 深度优先搜索 广度优先搜索 1+🟢🀄️open in new window 🔗open in new window
剑指 Offer 32-III从上到下打印二叉树 III[✓] 广度优先搜索 二叉树🟠🀄️open in new window

图的拓扑排序

题号标题题解标签难度力扣
207课程表[✓]深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window
210课程表 II[✓]深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window
1136并行课程 🔒 拓扑排序🟠🀄️open in new window 🔗open in new window
2050并行课程 III 拓扑排序 数组 1+🔴🀄️open in new window 🔗open in new window
802找到最终的安全状态深度优先搜索 广度优先搜索 1+🟠🀄️open in new window 🔗open in new window
851喧闹和富有深度优先搜索 拓扑排序 1+🟠🀄️open in new window 🔗open in new window

图的最小生成树

题号标题题解标签难度力扣
1584连接所有点的最小费用并查集 数组 1+🟠🀄️open in new window 🔗open in new window
1631最小体力消耗路径深度优先搜索 广度优先搜索 并查集 4+🟠🀄️open in new window 🔗open in new window
778水位上升的泳池中游泳深度优先搜索 广度优先搜索 并查集 4+🔴🀄️open in new window 🔗open in new window

单源最短路径

题号标题题解标签难度力扣
407接雨水 II广度优先搜索 数组 矩阵 1+🔴🀄️open in new window 🔗open in new window
743网络延迟时间深度优先搜索 广度优先搜索 2+🟠🀄️open in new window 🔗open in new window
787K 站中转内最便宜的航班深度优先搜索 广度优先搜索 3+🟠🀄️open in new window 🔗open in new window
1631最小体力消耗路径深度优先搜索 广度优先搜索 并查集 4+🟠🀄️open in new window 🔗open in new window
1786从第一个节点出发到最后一个节点的受限路径数 拓扑排序 动态规划 2+🟠🀄️open in new window 🔗open in new window

多源最短路径

题号标题题解标签难度力扣
815公交路线广度优先搜索 数组 哈希表🔴🀄️open in new window 🔗open in new window
1162地图分析广度优先搜索 数组 动态规划 1+🟠🀄️open in new window 🔗open in new window

次短路径

题号标题题解标签难度力扣
2045到达目的地的第二短时间广度优先搜索 最短路🔴🀄️open in new window 🔗open in new window

差分约束系统

题号标题题解标签难度力扣
995K 连续位的最小翻转次数位运算 队列 数组 2+🔴🀄️open in new window 🔗open in new window
1109航班预订统计数组 前缀和🟠🀄️open in new window 🔗open in new window

二分图基础题目

题号标题题解标签难度力扣
785判断二分图深度优先搜索 广度优先搜索 并查集 1+🟠🀄️open in new window 🔗open in new window

二分图最大匹配

题号标题题解标签难度力扣
LCP 04覆盖位运算 数组 2+🔴🀄️open in new window
1947最大兼容性评分和位运算 数组 动态规划 2+🟠🀄️open in new window 🔗open in new window
1595连通两组点的最小成本位运算 数组 动态规划 2+🔴🀄️open in new window 🔗open in new window