DFS Problems
About 2 min
Graph Depth-First Search Problems
No. | Title | Solution | Tags | Difficulty |
---|---|---|---|---|
0797 | All Paths From Source to Target | [[LeetCode XXXX]] | Depth-First Search, Breadth-First Search, Graph, Backtracking | Medium |
0200 | Number of Islands | [[LeetCode XXXX]] | Depth-First Search, Breadth-First Search, Union Find, Array, Matrix | Medium |
0695 | Max Area of Island | [[LeetCode XXXX]] | Depth-First Search, Breadth-First Search, Union Find, Array, Matrix | Medium |
0133 | Clone Graph | [[LeetCode XXXX]] | Depth-First Search, Breadth-First Search, Graph, Hash Table | Medium |
0494 | Target Sum | [[LeetCode XXXX]] | Array, Dynamic Programming, Backtracking | Medium |
0144 | Binary Tree Preorder Traversal | [[LeetCode XXXX]] | Stack, Tree, Depth-First Search, Binary Tree | Easy |
0094 | Binary Tree Inorder Traversal | [[LeetCode XXXX]] | Stack, Tree, Depth-First Search, Binary Tree | Easy |
0145 | Binary Tree Postorder Traversal | [[LeetCode XXXX]] | Stack, Tree, Depth-First Search, Binary Tree | Easy |
0589 | N-ary Tree Preorder Traversal | [[LeetCode XXXX]] | Stack, Tree, Depth-First Search | Easy |
0590 | N-ary Tree Postorder Traversal | [[LeetCode XXXX]] | Stack, Tree, Depth-First Search | Easy |
0124 | Binary Tree Maximum Path Sum | [[LeetCode XXXX]] | Tree, Depth-First Search, Dynamic Programming, Binary Tree | Hard |
0199 | Binary Tree Right Side View | [[LeetCode XXXX]] | Tree, Depth-First Search, Breadth-First Search, Binary Tree | Medium |
0543 | Diameter of Binary Tree | [[LeetCode XXXX]] | Tree, Depth-First Search, Binary Tree | Easy |
0662 | Maximum Width of Binary Tree | [[LeetCode XXXX]] | Tree, Depth-First Search, Breadth-First Search, Binary Tree | Medium |
0958 | Check Completeness of a Binary Tree | [[LeetCode XXXX]] | Tree, Breadth-First Search, Binary Tree | Medium |
0572 | Subtree of Another Tree | Tree, Depth-First Search, Binary Tree, String Matching, Hash Function | Easy | |
0100 | Same Tree | [[LeetCode XXXX]] | Tree, Depth-First Search, Breadth-First Search, Binary Tree | Easy |
0111 | Minimum Depth of Binary Tree | [[LeetCode XXXX]] | Tree, Depth-First Search, Breadth-First Search, Binary Tree | Easy |
0841 | Keys and Rooms | [[LeetCode XXXX]] | Depth-First Search, Breadth-First Search, Graph | Medium |
0129 | Sum Root to Leaf Numbers | [[LeetCode XXXX]] | Tree, Depth-First Search, Binary Tree | Medium |
0323 | Number of Connected Components in an Undirected Graph | [[LeetCode XXXX]] | Depth-First Search, Breadth-First Search, Union Find, Graph | Medium |
0684 | Redundant Connection | [[LeetCode XXXX]] | Depth-First Search, Breadth-First Search, Union Find, Graph | Medium |
0802 | Find Eventual Safe States | [[LeetCode XXXX]] | Depth-First Search, Breadth-First Search, Graph, Topological Sort | Medium |
0785 | Is Graph Bipartite? | [[LeetCode XXXX]] | Depth-First Search, Breadth-First Search, Union Find, Graph | Medium |
0886 | Possible Bipartition | [[LeetCode XXXX]] | Depth-First Search, Breadth-First Search, Union Find, Graph | Medium |
0323 | Number of Connected Components in an Undirected Graph | [[LeetCode XXXX]] | Depth-First Search, Breadth-First Search, Union Find, Graph | Medium |
0130 | Surrounded Regions | [[LeetCode XXXX]] | Depth-First Search, Breadth-First Search, Union Find, Array, Matrix | Medium |
0417 | Pacific Atlantic Water Flow | [[LeetCode XXXX]] | Depth-First Search, Breadth-First Search, Array, Matrix | Medium |
1020 | Number of Enclaves | [[LeetCode XXXX]] | Depth-First Search, Breadth-First Search, Union Find, Array, Matrix | Medium |
1254 | Number of Closed Islands | [[LeetCode XXXX]] | Depth-First Search, Breadth-First Search, Union Find, Array, Matrix | Medium |
1034 | Coloring A Border | [[LeetCode XXXX]] | Depth-First Search, Breadth-First Search, Array, Matrix | Medium |
0529 | Minesweeper | Depth-First Search, Breadth-First Search, Array, Matrix | Medium |