GL
GrindLens
PatternsSheetsPricingQuestions
  1. Home
  2. /Patterns
  3. /Multi-Source BFS
←All Patterns
GraphsEvidence Contributing

Multi-Source BFS

Seed the BFS queue with multiple starting nodes simultaneously so distances propagate from all sources in lockstep.

Practice Problems: 3
Difficulty: 0 Easy·3 Medium·0 Hard

Core technique

Review the technique, then try the mapped problems below. The right approach depends on each problem's constraints.

  • Core Strategy: Seed the BFS queue with multiple starting nodes simultaneously so distances propagate from all sources in lockstep.

Canonical Practice Problems

3 problems
1.Pacific Atlantic Water FlowMedium
Solve on LeetCode↗
2.Rotting OrangesMedium
Solve on LeetCode↗
3.Walls and GatesMedium
Solve on LeetCode↗

Curated Sheets Containing This Pattern

NeetCode 150

3 problems

→

NeetCode All

3 problems

→

Blind 75

1 problem

→

Striver A2Z

1 problem

→

Striver SDE Sheet

1 problem

→

Related Algorithmic Patterns

Graphs1 shared

Grid DFS Traversal

Graphs

BFS Shortest Path (Unweighted)

Graphs

Bounded-Hop Shortest Path (Bellman-Ford Style)

Graphs

Dijkstra's Shortest Path

Graphs

Flood Fill

GL
GrindLens

Precision pattern analytics and curated sheet tracking for algorithmic coding interview preparation.

Quick lookup:⌘Kor/

Platform

  • Patterns→
  • Sheets→
  • Pricing→

Community

  • Feedback
  • Report a bug
  • X
  • LinkedIn

© 2026 GrindLens. LeetCode is a trademark of LeetCode. GrindLens is an independent analytics platform and is not affiliated with or endorsed by LeetCode.

Terms of ServicePrivacy Policy