BFS vs DFS
A side-by-side comparison of Breadth-First Search (BFS) and Depth-First Search (DFS) graph traversal algorithms.
A side-by-side comparison of Breadth-First Search (BFS) and Depth-First Search (DFS) graph traversal algorithms.
Solving the Binary Tree Right Side View problem using a Depth-First Search (DFS) approach.
A complete guide to Depth-First Search (DFS) algorithm with explanations, use cases, and implementations in Python, Java, C++, and JavaScript.
Learn how to implement Depth-First Search (DFS) for graph traversal in Swift, with recursive and iterative code examples and complexity analysis.
Solving the Diameter of Binary Tree problem using a Recursive Depth-First Search (DFS) approach.
Solution for LeetCode 802: Find Eventual Safe States, utilizing Graph Traversal (DFS Cycle Detection) and BFS (Kahn's Algorithm).
Solution for LeetCode 733: Flood Fill, utilizing Graph Traversal (DFS).
Solving the Maximum Depth of Binary Tree problem using a Recursive Depth-First Search (DFS) approach.
Solution for LeetCode 200: Number of Islands, utilizing Graph Traversal (DFS) to count connected components in a matrix.
Solution for LeetCode 547: Number of Provinces, utilizing Graph Traversal (DFS) to find connected components.
Practice problems for Graphs to help you understand the concepts better.
Solution for LeetCode 130: Surrounded Regions, utilizing Graph Traversal (DFS) on the boundaries to capture enclosed components.
A complete guide to Tarjan's Algorithm for Strongly Connected Components (SCCs) with explanations, use cases, and implementations in Python, Java, C++, and JavaScript.
Solving the Vertical Order Traversal of a Binary Tree problem using Coordinate Mapping and Sorting.
Solve the Word Search problem using DFS with backtracking on a 2D character grid. Covers both Word Search I (single word) and Word Search II (multiple words with Trie).