knaxuslearn · build · ship

Depth-First Search

Go deep down one path before backing up, in trees, graphs and grids. 302 problems from 44 companies, most widely asked first. Tick them off as you go; your ticks stay in this browser.

problems
302
hard
72
done
0

302 of 302 problems

  1. 1Number of Islands (opens LeetCode in a new tab)Array, Depth-First Search, Breadth-First SearchMedium27companies
  2. 2Course Schedule (opens LeetCode in a new tab)Depth-First Search, Breadth-First Search, Graph TheoryMedium21companies
  3. 3Word Search (opens LeetCode in a new tab)Array, String, BacktrackingMedium19companies
  4. 4Course Schedule II (opens LeetCode in a new tab)Depth-First Search, Breadth-First Search, Graph TheoryMedium18companies
  5. 5Binary Tree Maximum Path Sum (opens LeetCode in a new tab)Dynamic Programming, Tree, Depth-First SearchHard16companies
  6. 6Serialize and Deserialize Binary Tree (opens LeetCode in a new tab)String, Tree, Depth-First SearchHard16companies
  7. 7Cheapest Flights Within K Stops (opens LeetCode in a new tab)Dynamic Programming, Depth-First Search, Breadth-First SearchMedium14companies
  8. 8Lowest Common Ancestor of a Binary Tree (opens LeetCode in a new tab)Tree, Depth-First Search, Binary TreeMedium14companies
  9. 9Max Area of Island (opens LeetCode in a new tab)Array, Depth-First Search, Breadth-First SearchMedium14companies
  10. 10Maximum Depth of Binary Tree (opens LeetCode in a new tab)Tree, Depth-First Search, Breadth-First SearchEasy14companies
  11. 11Validate Binary Search Tree (opens LeetCode in a new tab)Tree, Depth-First Search, Binary Search TreeMedium14companies
  12. 12Accounts Merge (opens LeetCode in a new tab)Array, Hash Table, StringMedium13companies
  13. 13Diameter of Binary Tree (opens LeetCode in a new tab)Tree, Depth-First Search, Binary TreeEasy12companies
  14. 14Flatten Nested List Iterator (opens LeetCode in a new tab)Stack, Tree, Depth-First SearchMedium12companies
  15. 15Longest Increasing Path in a Matrix (opens LeetCode in a new tab)Array, Dynamic Programming, Depth-First SearchHard12companies
  16. 16Reconstruct Itinerary (opens LeetCode in a new tab)Array, String, Depth-First SearchHard12companies
  17. 17Alien Dictionary (opens LeetCode in a new tab)Array, String, Depth-First SearchHard11companies
  18. 18All Nodes Distance K in Binary Tree (opens LeetCode in a new tab)Hash Table, Tree, Depth-First SearchMedium11companies
  19. 19Binary Tree Right Side View (opens LeetCode in a new tab)Tree, Depth-First Search, Breadth-First SearchMedium11companies
  20. 20Shortest Bridge (opens LeetCode in a new tab)Array, Depth-First Search, Breadth-First SearchMedium11companies
  21. 21Clone Graph (opens LeetCode in a new tab)Hash Table, Depth-First Search, Breadth-First SearchMedium10companies
  22. 22Evaluate Division (opens LeetCode in a new tab)Array, String, Depth-First SearchMedium10companies
  23. 23Kth Smallest Element in a BST (opens LeetCode in a new tab)Tree, Depth-First Search, Binary Search TreeMedium10companies
  24. 24Making A Large Island (opens LeetCode in a new tab)Array, Depth-First Search, Breadth-First SearchHard10companies
  25. 25Vertical Order Traversal of a Binary Tree (opens LeetCode in a new tab)Hash Table, Tree, Depth-First SearchHard10companies
  26. Showing 25 of 302

"Companies" counts the companies in DSA Atlas that have asked the problem at any time. Patterns and data structures come from LeetCode topic tags. Your ticks are saved in this browser only, and shared with the company pages.

Credits

These lists are the work of two open GitHub projects. Thank you to their authors.

Problem text stays on LeetCode; we link to it. Frequencies are relative within a company.

Last synced