Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DFS problem #8

Open
kevin373738 opened this issue Nov 7, 2024 · 0 comments
Open

DFS problem #8

kevin373738 opened this issue Nov 7, 2024 · 0 comments

Comments

@kevin373738
Copy link

Certainly! Here’s a list of some popular DFS problems on LeetCode, covering various data structures and applications of DFS such as tree traversal, graph traversal, and backtracking:

Binary Tree DFS Problems

  1. 144. Binary Tree Preorder Traversal
  2. 94. Binary Tree Inorder Traversal
  3. 145. Binary Tree Postorder Traversal
  4. 104. Maximum Depth of Binary Tree
  5. 112. Path Sum
  6. 113. Path Sum II
  7. 124. Binary Tree Maximum Path Sum
  8. 236. Lowest Common Ancestor of a Binary Tree

Graph DFS Problems

  1. 200. Number of Islands
  2. 130. Surrounded Regions
  3. 797. All Paths From Source to Target
  4. 733. Flood Fill
  5. 695. Max Area of Island
  6. 417. Pacific Atlantic Water Flow
  7. 547. Number of Provinces
  8. 785. Is Graph Bipartite?

Backtracking DFS Problems

  1. 46. Permutations
  2. 78. Subsets
  3. 39. Combination Sum
  4. 77. Combinations
  5. 51. N-Queens
  6. 52. N-Queens II
  7. 212. Word Search II
  8. 22. Generate Parentheses

Advanced DFS and Path-Finding Problems

  1. 329. Longest Increasing Path in a Matrix
  2. 1245. Tree Diameter
  3. 399. Evaluate Division
  4. 684. Redundant Connection
  5. 1376. Time Needed to Inform All Employees

These problems showcase DFS’s versatility, from simple traversals and connectivity checks to more complex recursive backtracking challenges. Let me know if you’d like more information on any of these!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant