[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. 全排列 解题思路一 解题步骤 代 ...
随机推荐
- C常见机试题
初级: 一.请编写函数long fun(long int x),功能是:将长整型数x中每一位上为奇数的数依次取出,并逆序和顺序分别构成一个新数返回. 例如:程序运行时输入123456789,输出: ...
- Android 验证APK是否已经签名或是否是Debug签名
https://source.android.google.cn/ http://www.android-doc.com/tools/publishing/app-signing.html Signi ...
- vue比较模板来跟新数据
一,使用场景: 点击menu通过路由,跳转当前列表,第二次点击menu,希望可以刷新列表: 二,解决思路: 给路由添加时间戳: 三,参考观点: 用 :key管理可复用的元素 模板相同,会造成一种“复用 ...
- sencha touch 百度地图扩展(2014-6-24)(废弃 仅参考)
扩展代码如下: Ext.define('ux.BMap', { alternateClassName: 'bMap', extend: 'Ext.Container', xtype: 'bMap', ...
- PostgreSQL9.3安装tds_fdw扩展
PostgreSQL从9.x开始支持所谓的外表的功能,就是在PostgreSQL中通过安装一些扩展再进行一些配置可以在本地建立一个外表映射到其他不同类型的数据库(可以大致理解为跨越PostgreSQL ...
- express-session相关用法
通常我们在node的登录注册小案例时,我们经常要用到express-session做会话处理. express-sessionApi使用方法:https://github.com/expressjs/ ...
- numpy中的reshape中参数为-1
上篇文章中的reshape(-1,2),有的时候不明白为什么会有参数-1,可以通过查找文档中的reshape()去理解这个问题 根据Numpy文档(https://docs.scipy.org/doc ...
- 7.19python昨日复习和多线程
关于GIL锁的经典面试题!!
- jqueryui和easyui区别
jQuery自带的一个可选UI库,但是非常可惜,一些关键的组件没有包含进去,如TreeView, DataGrid,还需要寻找第三方的插件. EasyUI是某公司开发的一套对私免费,对公收费的UI库, ...
- Python之Subprocess模块
PS:打开文件时候加b参数是代表以二进制方式打开,在Linux加不加都可以,在windows上面最好加b参数否则可能会出现问题 使用system返回执行结果不赋值,使用popen返回了结果赋值给cmd ...