Visualizer CodeViz · Algorithms, visualized

Princeton Algorithms, Part I & Part II

Every core algorithm, animated, in Python

The two Princeton courses cover roughly fifty algorithms and data structures. Below is all of them, in lecture order. Pick one: you get the implementation, a picture that moves one step at a time, the invariant that keeps it correct, and the running-time claim it is famous for. Nothing here is a recording — the animation is generated by running the algorithm on whatever input you give it.

Part I — data types, sorting, searching

Part II — graphs, strings, compression