Greedy Algorithms
Discover and visualize classic greedy algorithms. Click on any algorithm to learn more and interact with its visualization.
Kruskal's Algorithm
Finds the Minimum Spanning Tree of a graph by always choosing the smallest edge that doesn't form a cycle.
Prim's Algorithm
Builds a Minimum Spanning Tree by growing from a starting node, always adding the smallest edge to the tree.
Huffman Coding
Constructs an optimal prefix code for data compression using a greedy approach.
Activity Selection
Selects the maximum number of non-overlapping activities by always picking the next activity that finishes earliest.