[LeetCode] questions conclustion_BFS, DFS
BFS, DFS 的题目总结.
Directed graph:
Directed Graph Loop detection and if not have, path to print all path.
BFS/DFS: (可以用BFS或者DFS的,主要还是遍历)
[LeetCode] 733. Flood Fill_Easy tag: BFS 1
[LeetCode] 690. Employee Importance_Easy tag: BFS 1
[LeetCode] 529. Minesweeper_ Medium_ tag: BFS
[LeetCode] 200. Number of Islands_ Medium tag: BFS
[LeetCode] 133. Clone Graph_ Medium tag: BFS, DFS
[LeetCode] 261. Graph Valid Tree _ Medium tag: BFS
[LeetCode] 301. Remove Invalid Parentheses_Hard tag:BFS
[LeetCode] 104. Maximum Depth of Binary Tree_Easy tag: DFS
[LeetCode] 827. Making A Large Island
[LeetCode] 695. Max Area of Island_Easy tag: DFS/BFS
[LeetCode] 490. The Maze_Medium tag: BFS/DFS
[LeetCode] 130. Surrounded Regions_Medium tag: DFS
BFS(shortest path/distance, level traversal)
[Leetcode] 863. All Nodes Distance K in Binary Tree_ Medium tag: BFS, Amazon 1
[LeetCode] 199. Binary Tree Right Side View_ Medium tag: BFS, Amazon
[LeetCode] 102. Binary Tree Level Order Traversal_Medium tag: BFS
[LeetCode] 127. Word Ladder _Medium tag: BFS
[LeetCode] 675. Cut Off Trees for Golf Event_Hard tag: BFS
[LeetCode] 103. Binary Tree Zigzag Level Order Traversal _ Medium tag: BFS
[LeetCode] 101. Symmetric Tree_ Easy tag: BFS
[LeetCode] 513. Find Bottom Left Tree Value_ Medium tag: BFS
[LeetCode] 286. Walls and Gates_Medium tag: BFS
[LeetCode] 310. Minimum Height Trees_Medium tag: BFS
DFS
[LeetCode] 207 Course Schedule_Medium tag: BFS, DFS 1
[LeetCode] 785. Is Graph Bipartite?_Medium tag: DFS, BFS
[LeetCode] 210. Course Schedule II
[LeetCode] 694. Number of Distinct Islands
[LeetCode] 711. Number of Distinct Islands II_hard tag: DFS
[LeetCode] 851. Loud and Rich_ Medium tag: DFS
[LeetCode] 112. Path Sum_Easy tag: DFS
[LeetCode] 114. Flatten Binary Tree to Linked List_Medium tag: DFS
[LeetCode] 257. Binary Tree Paths_ Easy tag: DFS
[LeetCode] 437. Path Sum III_ Easy tag: DFS
[LeetCode] 124. Binary Tree Maximum Path Sum_ Hard tag: DFS recursive
[LeetCode] 687. Longest Univalue Path_Easy tag: DFS recursive
[LeetCode] 298. Binary Tree Longest Consecutive Sequence_Medium tag: DFS recursive
[LeetCode] 549. Binary Tree Longest Consecutive Sequence II_ Medium tag: DFS recursive
[LeetCode] 721. Accounts Merge_Medium tag: DFS recursive
[LeetCode] 111. Minimum Depth of Binary Tree_Easy tag:DFS
[LeetCode] 110. Balanced Binary Tree_Easy tag: DFS
[LeetCode] 100. Same Tree_Easy tag: DFS
[LeetCode] 99. Recover Binary Search Tree
[LeetCode] 129. Sum Root to Leaf Numbers_Medium tag: DFS
[LeetCode] 559. Maximum Depth of N-ary Tree_Easy tag: DFS
[LeetCode] questions conclustion_BFS, DFS的更多相关文章
- All LeetCode Questions List 题目汇总
All LeetCode Questions List(Part of Answers, still updating) 题目汇总及部分答案(持续更新中) Leetcode problems clas ...
- Summary: curated List of Top 75 LeetCode Questions to Save Your Time
Facebook / Eng tech lead Dec 30, 2018 68 Comments New Year Gift to every fellow time-constrained ...
- LeetCode Subsets (DFS)
题意: 给一个集合,有n个互不相同的元素,求出所有的子集(包括空集,但是不能重复). 思路: DFS方法:由于集合中的元素是不可能出现相同的,所以不用解决相同的元素而导致重复统计. class Sol ...
- [LeetCode] questions conclusion_ Binary Search
Binary Search T(n) = T(n/2) + O(1) => T(n) = O(lg n) proof: 如果能用iterable , 就用while loop, 可以防 ...
- [LeetCode] questions conlusion_InOrder, PreOrder, PostOrder traversal
Pre: node 先, Inorder: node in, Postorder: node 最后 PreOrder Inorde ...
- [LeetCode] questions conclusion_ Dynamic Programming
Questions: [LeetCode] 198. House Robber _Easy tag: Dynamic Programming [LeetCode] 221. Maximal Squar ...
- [LeetCode] questions conclustion_Path in Tree
Path in Tree: [LeetCode] 112. Path Sum_Easy tag: DFS input: root, target, return True if exi ...
- Leetcode总结之DFS
package DFS; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; impo ...
- LeetCode刷题 DFS+回溯
一.DFS介绍 二.LeetCode 实战 LC 17. 电话号码的字母组合 解法思路 解题步骤 代码 LC 79. 单词搜索 解题思路 解题步骤 代码 LC 46. 全排列 解题思路一 解题步骤 代 ...
随机推荐
- openlayers中利用vector实现marker的方式
项目需要一个小型的gis.openlayers,geoserver,postgres组合是比较好的选择. openlayers的marker层好像不支持拖动操作.通过研究api发现,可以利用vecto ...
- vim重复操作的宏录制
在编辑某个文件的时候,可能会出现需要对某种特定的操作进行许多次的情况,以编辑下面的文件为例: ;==================================================== ...
- 【Spring Boot && Spring Cloud系列】那些Spring Boot中踩过的坑
一.不连接数据库启动springboot报错 Cannot determine embedded database driver class for database type NONE 原因:Spr ...
- 原生js--编码请求主体(异步请求)
1.表单编码请求 需要对每个表单元素进行普通的URL编码,使用“=”把编码后的名字和值分开,并使用“&”分开名值对. 例如:a=b&c=d 表单数据编码的MIME类型:applicat ...
- [Offer收割]编程练习赛15 B.分数调查[加权并查集]
#1515 : 分数调查 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi的学校总共有N名学生,编号1-N.学校刚刚进行了一场全校的古诗文水平测验. 学校没有公布测 ...
- 4606: [Apio2008]DNA
4606: [Apio2008]DNA Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 63 Solved: 36[Submit][Status][D ...
- 2333: [SCOI2011]棘手的操作[离线线段树]
2333: [SCOI2011]棘手的操作 Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 2325 Solved: 909[Submit][Stat ...
- android中SimpleCursorAdapter _id错误的问题
作为一个android新手,在绑定数据的时候是这样的 ListView listview=(ListView)this.findViewById(R.id.listView1); XJDal xj=n ...
- mysqladmin 命令详解
mysqladmin是一个执行管理操作的客户端程序.它可以用来检查服务器的配置和当前状态.创建和删除数据库等. mysqladmin 工具的使用格式: mysqladmin [option] comm ...
- Keepalived指定文件接收日志
keepalived默认日志接收文件为/var/log/messages不方便查看,可以指定文件接收日志 修改配置文件/etc/sysconfig/keepalived KEEPALIVED_OPTI ...