Greedy Algorithms Visualizers
See how locally optimal choices build a globally good solution.
Huffman Coding
Watch a Huffman tree grow as the two least-frequent nodes are greedily merged, then see the resulting prefix codes and compression savings.
Dijkstra's Algorithm
See the greedy choice in action as Dijkstra always expands the closest unvisited node, relaxing edges to find the shortest path from a source.
Kruskal's & Prim's Algorithm
Compare two greedy strategies for building a Minimum Spanning Tree side by side: Kruskal picks the globally cheapest edge, Prim grows outward from a node.