GraphsEvidence Contributing
Bounded-Hop Shortest Path (Bellman-Ford Style)
Relax edges for a limited number of rounds (bounding the number of hops/stops) rather than running unbounded Dijkstra, since the constraint makes plain Dijkstra unsound.
Practice Problems: 1
Difficulty: 0 Easy·1 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: Relax edges for a limited number of rounds (bounding the number of hops/stops) rather than running unbounded Dijkstra, since the constraint makes plain Dijkstra unsound.