Depth-First Search
50 solutions
- 0094 - Binary Tree Inorder Traversal (Easy)
- 0100 - Same Tree (Easy)
- 0112 - Path Sum (Easy)
- 0113 - Path Sum II (Medium)
- 0124 - Binary Tree Maximum Path Sum (Hard)
- 0129 - Sum Root to Leaf Numbers (Medium)
- 0130 Surrounded Regions (Medium)
- 0133 - Clone Graph (Medium)
- 0144 - Binary Tree Preorder Traversal (Easy)
- 0145 - Binary Tree Postorder Traversal (Easy)
- 0200 - Number of Islands (Medium)
- 0207 - Course Schedule (Medium)
- 0210 - Course Schedule II (Medium)
- 0211 - Design Add and Search Words Data Structure (Medium)
- 0226 - Invert Binary Tree (Easy)
- 0230 - Kth Smallest Element in a BST (Medium)
- 0235 - Lowest Common Ancestor of a Binary Search Tree (Medium)
- 0297 - Serialize and Deserialize Binary Tree (Hard)
- 0298 - Binary Tree Longest Consecutive Sequence (Medium)
- 0323 - Number of Connected Components in an Undirected Graph (Medium)
- 0329 - Longest Increasing Path in a Matrix (Hard)
- 0332 - Reconstruct Itinerary (Hard)
- 0404 - Sum of Left Leaves (Easy)
- 0417 - Pacific Atlantic Water Flow (Medium)
- 0437 - Path Sum III (Medium)
- 0501 - Find Mode in Binary Search Tree (Easy)
- 0508 - Most Frequent Subtree Sum (Medium)
- 0543 - Diameter of Binary Tree (Easy)
- 0606 - Construct String from Binary Tree (Easy)
- 0623 - Add One Row to Tree (Medium)
- 0637 - Average of Levels in Binary Tree (Easy)
- 0653 - Two Sum IV - Input is a BST (Easy)
- 0684 - Redundant Connection (Medium)
- 0695 - Max Area of Island (Medium)
- 0743 - Network Delay Time (Medium)
- 0778 - Swim in Rising Water (Hard)
- 0787 - Cheapest Flights Within K Stops (Medium)
- 0814 - Binary Tree Pruning (Medium)
- 0841 - Keys and Rooms (Medium)
- 0947 - Most Stones Removed with Same Row or Column (Medium)
- 0987 - Vertical Order Traversal of a Binary Tree (Hard)
- 1254 - Number of Closed Islands (Medium)
- 1372 - Longest ZigZag Path in a Binary Tree (Medium)
- 1443 - Minimum Time to Collect All Apples in a Tree (Medium)
- 1448 - Count Good Nodes in Binary Tree (Medium)
- 1457 - Pseudo-Palindromic Paths in a Binary Tree (Medium)
- 1519 - Number of Nodes in the Sub-Tree With the Same Label (Medium)
- 1631 - Path With Minimum Effort (Medium)
- 1706 - Where Will the Ball Fall (Medium)
- 2477 - Minimum Fuel Cost to Report to the Capital (Medium)