Tags

Multi-Source BFS

Multi-Source BFS

0 lessons
4 problems

multi-source-bfs

Practice Problems

4 problems

Pacific Atlantic Water Flow

Not Started
Medium

Given a matrix of heights, find all cells from which water can flow to both the Pacific and Atlantic oceans.

Graphs
DFS
BFS
Multi-Source BFS
Intermediate

366

10

Rotting Oranges

Free
Not Started
Medium

Given a grid where cells contain fresh oranges, rotten oranges, or are empty, determine the minimum time for all fresh oranges to rot via adjacency spreading.

Graphs
BFS
Multi-Source BFS
Islands / Flood Fill
Intermediate

292

4

Walls and Gates

Not Started
Medium

Given a grid with walls, gates, and empty rooms, fill each empty room with the distance to its nearest gate using multi-source BFS.

Graphs
BFS
Multi-Source BFS
Intermediate

677

4

01 Matrix

Not Started
Medium

Given a binary matrix, find the distance of each cell to the nearest 0 using multi-source BFS.

Arrays
Matrix Algorithms
Matrix Traversal
BFS
Multi-Source BFS
Intermediate

602

4