Explore modules

Bellman-Ford Algorithm

Visualize the shortest path algorithm that handles negative edge weights by relaxing all edges in V-1 iterations.

Free theory article

Visualize the shortest path algorithm that handles negative edge weights by relaxing all edges in V-1 iterations.

Concept & interpretation

The Bellman-Ford algorithm finds the shortest path from a single source node to all other nodes in a weighted graph. Unlike Dijkstra's algorithm, it correctly handles graphs with negative edge weights and is capable of detecting negative weight cycles. It works by systematically relaxing all edges in the graph V-1 times, where V is the number of vertices.

Read the full free theory article