Prim's Algorithm Code Visualization

Опубликовано: 10 Май 2026
на канале: Computer Psychology - Joy Liu
3,185
47

This is a demo of Prim's Algorithm on Minimum Spanning Tree (MST) with pseudocode walkthrough. The example of the graph is from CLRS (Chapter 23.2 the algorithms of Kruskal and Prim). The code is not. The code is the basic version using for loops to get the min edge (vs. heap on CLRS).

I'm making a few demo videos which don't contain any voiceover. They explain themselves by animation.

[About this channel] Compsyc for Computer Psychology :) I make videos for beginners.
[Animation engine] Manim(CE) with Python
[Copyright] 1) Pseudocode is found here http://www.mathcs.emory.edu/~cheung/C... 2) The graph is found on CLRS.