Back to all patterns

BFS or Bellman-Ford

1 problems • Practice on LeetCode to earn credits

About This Pattern

Master the BFS or Bellman-Ford pattern by practicing these problems organized by difficulty.Focus on the Key Signals - these are the indicators that tell you when to use this pattern.

Medium (1)

Cheapest Flights Within K Stops

Find cheapest flight path with at most k stops.

Key Signals:

Limited stops constraintTrack cost and stopsBFS or DP