Algorithms
Sixty-seven algorithms in eight families. Pick one to watch it work, one step at a time.
ordering
Putting a row of numbers in order, smallest first.
finding
Finding one number in a row without looking at every one.
storing
Keeping things so they are quick to add, find and take out again.
- StackLevel 1 of 3
- QueueLevel 1 of 3
- Linked listLevel 1 of 3
- String hashingLevel 1 of 3
- Binary heapLevel 2 of 3
- Building a heapLevel 2 of 3
- Changing a number in a heapLevel 2 of 3
- Binary search treeLevel 2 of 3
- Hash table with chainingLevel 2 of 3
- Hash table with open addressingLevel 2 of 3
- Hash table with double hashingLevel 2 of 3
- Hash table that growsLevel 2 of 3
- TrieLevel 2 of 3
- Union-findLevel 3 of 3
- AVL treeLevel 3 of 3
networks
Places joined by roads: the shortest way, the cheapest links, what has to come first.
- Breadth-first searchLevel 2 of 3
- Depth-first searchLevel 2 of 3
- Dijkstra's shortest pathsLevel 2 of 3
- Kruskal's cheapest linksLevel 2 of 3
- Prim's cheapest linksLevel 2 of 3
- Topological orderLevel 2 of 3
- A* searchLevel 3 of 3
- Bellman-Ford shortest pathsLevel 3 of 3
- Floyd-Warshall, every pairLevel 3 of 3
- Maximum flowLevel 3 of 3
planning ahead
Making the best choice when every choice changes what comes next.
words
Finding a short piece of text inside a long one.
puzzles
Classic puzzles, solved by trying, ruling out and moving one piece at a time.
learning
Learning from examples to sort new points into classes, or to predict a number.