मुख्य कंटेंट तक स्किप करें

13 docs tagged with "bfs"

सारे टैग देखें

BFS vs DFS

A side-by-side comparison of Breadth-First Search (BFS) and Depth-First Search (DFS) graph traversal algorithms.

Breadth-First Search (BFS)

A complete guide to Breadth-First Search (BFS) algorithm with explanations, use cases, and implementations in Python, Java, C++, and JavaScript.

Cheapest Flights Within K Stops

Solution for LeetCode 787: Cheapest Flights Within K Stops, utilizing BFS (Modified Dijkstra) to find the cheapest flight path within K stops.

Edmonds-Karp Algorithm

The Edmonds-Karp algorithm is a flow network algorithm used to compute the maximum flow between a source and a sink in a flow network. It is an implementation of the Ford-Fulkerson method that uses breadth-first search (BFS) to find augmenting paths.

Find Eventual Safe States

Solution for LeetCode 802: Find Eventual Safe States, utilizing Graph Traversal (DFS Cycle Detection) and BFS (Kahn's Algorithm).

Flood Fill

Solution for LeetCode 733: Flood Fill, utilizing Graph Traversal (DFS).

Number of Islands

Solution for LeetCode 200: Number of Islands, utilizing Graph Traversal (DFS) to count connected components in a matrix.

Number of Provinces

Solution for LeetCode 547: Number of Provinces, utilizing Graph Traversal (DFS) to find connected components.

Rotten Oranges Algorithm

Solve the Rotten Oranges problem using Breadth-First Search (BFS) to determine the minimum time required for all fresh oranges to rot.

Surrounded Regions

Solution for LeetCode 130: Surrounded Regions, utilizing Graph Traversal (DFS) on the boundaries to capture enclosed components.