Articles tagged with Depth-First Search
- Most Frequent Subtree Sum - Plain and simple DFS, published 2024-05-08
- Greatest Common Divisor Traversal - Prime graph connectivity, published 2024-02-25
- Find All People With Secret - UnionFind and Min-Heap solutions, published 2024-02-25
- Out of Boundary Paths - DFS + Recursive Memoization, published 2024-01-26
- Pseudo-Palindromic Paths in a Binary Tree - Simple DFS with palindrome test at leaves, published 2024-01-24
- Leaf-Similar Trees - Leaf Iterator, published 2024-01-09
- Restore the Array From Adjacent Pairs - Create graph and run DFS, published 2023-11-10
- Count Nodes Equal to Average of Subtree - Simple recursion in O(n) TC, published 2023-11-02
- Find Mode in Binary Search Tree - Two solutions: O(h) space and O(1) space, published 2023-11-01
- Design Add and Search Words Data Structure - Trie structure, published 2023-10-27
- Find Largest Value in Each Tree Row - BFS and DFS solutions, published 2023-10-24
- Parallel Courses II - DFS + DP + Bitmasking, published 2023-10-20
- Validate Binary Tree Nodes - DFS solution, published 2023-10-17
- Maximum Level Sum of a Binary Tree - BFS in Java, published 2023-06-15
- Evaluate Division - DFS + BFS + DSU solutions, published 2023-05-20
- Combination Sum IV - DFS Recursive Memoization, published 2023-05-20
- Combination Sum - DFS Recursion, published 2023-05-18
- Combination Sum III - DFS Recursion, published 2023-05-18
- Combination Sum II - DFS Recursion, published 2023-05-18
- Maximum Number of Moves in a Grid - DFS + BFS + DP solutions, published 2023-05-17
- Count the Number of Complete Components - DFS + BFS + DSU solutions, published 2023-05-14
- Number of Provinces - Union Find in C++ and Java, published 2023-04-29
- Similar String Groups - DFS + BFS + Union-Find solutions, published 2023-04-28
- Minimize the Total Price of the Trips - DFS + DP solution with explanation, published 2023-04-27
- Profitable Schemes - Memoization step by step, published 2023-04-24
- Maximum Width of Binary Tree - Step by step BFS, published 2023-04-24
- Cousins in Binary Tree II - DFS solution + BFS solution, published 2023-04-15
- Concatenated Words - Word Break extension (DP), published 2023-01-27
- Longest Absolute File Path - Monotonic stack solution explained, published 2022-12-29
- Keys and Rooms - DFS + BFS solutions, published 2022-12-20
- Is Graph Bipartite? - BFS, published 2022-11-19
- Word Search II - [Explained] Trie + DFS Clean C++ code, published 2022-11-16
- Count Complete Tree Nodes - Recursivle solution with explanation, published 2022-11-16
- Where Will the Ball Fall - Just play the game!, published 2022-11-01
- Path Sum III - Easy DFS, published 2022-10-25
- Binary Tree Right Side View - Easy BFS, published 2022-10-25
- Surrounded Regions - Island method [DFS], published 2022-10-17
- Number of Islands - Easy DFS, published 2022-10-17
- Populating Next Right Pointers in Each Node - BFS+Queue O(1) space, O(n) time, published 2022-10-14
- Flatten Nested List Iterator - Simple Recursion, published 2022-10-13
- Course Schedule II - [Two methods] Kahn's Algorithm and DFS, published 2022-10-12
- Add One Row to Tree - Easy to understand DFS solution, published 2022-10-05
- Count Sub Islands - DFS solution, published 2022-09-27
- Validate Binary Search Tree - Iterative InOrder C++, published 2022-08-11
- All Paths From Source to Target - Easy DFS solution, published 2022-06-15
- Network Delay Time - Dijkstra method, published 2022-05-15
- Deepest Leaves Sum - Easy DFS solution, published 2022-05-15
- Populating Next Right Pointers in Each Node II - Connections using Level Wise Traversal DFS, published 2022-05-13
- Smallest String With Swaps - DFS solution, published 2022-04-27
- Convert BST to Greater Tree - Easy HashMap solution, published 2022-04-16
- Binary Search Tree to Greater Sum Tree - Easy HashMap solution, published 2022-04-16
- Trim a Binary Search Tree - Recursive C++ solution, published 2022-04-15
- Max Area of Island - DFS solution, published 2022-02-03
- House Robber III - Recursion+Memoization [cpp] Explained with intuitions step-wise, published 2022-01-07