Back to Browse

Bellman-Ford Algorithm — Visualized in 7 Minutes

May 12, 2026
7:01

Bellman-Ford is a shortest-path algorithm that handles graphs with negative edge weights — something Dijkstra's algorithm cannot do. In this video, we visualize: - Why Dijkstra fails on graphs with negative edges - The negative cycle problem - The Bellman-Ford algorithm step by step - Why O(n·m) is the right complexity Animated with Manim. No narration — built to cross language barriers. Chapters: 0:00 Introduction 0:06 What does Dijkstra do? 0:17 Dijkstra's algorithm 0:31 Dijkstra walkthrough (positive weights) 1:59 What if there are negative weights? 2:09 Dijkstra fails on negative edges 3:42 Why Dijkstra fails 3:54 The negative cycle problem 4:13 The "no negative cycles" assumption 4:24 The Bellman-Ford algorithm 4:44 Bellman-Ford walkthrough 6:34 Time complexity: O(n·m) 6:49 Outro #GraphTheory #Algorithms #BellmanFord #ComputerScience

Download

0 formats

No download links available.

Bellman-Ford Algorithm — Visualized in 7 Minutes | NatokHD