Master the Bellman-Ford algorithm: single-source shortest paths that work with negative edge weights, plus negative-cycle detection. Build a relaxation pass, the full algorithm in your language of choice, and answer distance and cycle queries.
Prerequisites:
- Knowledge of a programming language of your choice.
- Helpful: the Dijkstra course (shortest paths with non-negative weights).