Depth-First Search
53 solutions
- 94 - Binary Tree Inorder Traversal
- 100 - Same Tree
- 112 - Path Sum
- 113 - Path Sum II
- 124 - Binary Tree Maximum Path Sum
- 129 - Sum Root to Leaf Numbers
- 130 - Surrounded Regions
- 133 - Clone Graph
- 144 - Binary Tree Preorder Traversal
- 145 - Binary Tree Postorder Traversal
- 200 - Number of Islands
- 207 - Course Schedule
- 210 - Course Schedule II
- 211 - Design Add and Search Words Data Structure
- 226 - Invert Binary Tree
- 230 - Kth Smallest Element in a BST
- 235 - Lowest Common Ancestor of a Binary Search Tree
- 297 - Serialize and Deserialize Binary Tree
- 298 - Binary Tree Longest Consecutive Sequence
- 323 - Number of Connected Components in an Undirected Graph
- 329 - Longest Increasing Path in a Matrix
- 332 - Reconstruct Itinerary
- 404 - Sum of Left Leaves
- 417 - Pacific Atlantic Water Flow
- 437 - Path Sum III
- 501 - Find Mode in Binary Search Tree
- 508 - Most Frequent Subtree Sum
- 543 - Diameter of Binary Tree
- 606 - Construct String from Binary Tree
- 623 - Add One Row to Tree
- 637 - Average of Levels in Binary Tree
- 653 - Two Sum IV - Input is a BST
- 684 - Redundant Connection
- 695 - Max Area of Island
- 743 - Network Delay Time
- 778 - Swim in Rising Water
- 787 - Cheapest Flights Within K Stops
- 814 - Binary Tree Pruning
- 841 - Keys and Rooms
- 947 - Most Stones Removed with Same Row or Column
- 987 - Vertical Order Traversal of a Binary Tree
- 1254 - Number of Closed Islands
- 1267 - Count Servers that Communicate
- 1372 - Longest ZigZag Path in a Binary Tree
- 1443 - Minimum Time to Collect All Apples in a Tree
- 1448 - Count Good Nodes in Binary Tree
- 1457 - Pseudo-Palindromic Paths in a Binary Tree
- 1519 - Number of Nodes in the Sub-Tree With the Same Label
- 1631 - Path With Minimum Effort
- 1706 - Where Will the Ball Fall
- 2477 - Minimum Fuel Cost to Report to the Capital
- 3619 - Count Islands With Total Value Divisible by K
- 3841 - Palindromic Path Queries in a Tree