Algorithms
Map
Arrows point from what you learn first to what it opens. Point at a concept to light up its chain and where it comes back deeper. Right-click a concept (or press and hold it) for its lessons and stories.
- Proven to depth123
- Open
- Locked
- Comes back deeper
Learning path
In the order the concepts build on each other.
- AlgorithmLockedA set of exact steps that takes an input and always finishes with the right answer, like Euclid's way of finding the greatest common divisor.Opens after: Loops
- Algorithm efficiencyLockedHow the work an algorithm does grows as its input grows - linear, quadratic, constant - measured by counting steps and written in Big-O, which decides whether a program that is instant on small data can cope with real data.Opens after: Algorithm, Sets in code
- Binary searchLockedFinding an item in a sorted list by looking at the middle of what is left and throwing away the half it can't be in - about twenty looks for a million items.Opens after: Algorithm efficiency
- SortingLockedPutting items in order - how a simple method like selection sort works and why it is slow, and how to use Python's fast, stable sort with keys, including sorting by several things at once.Opens after: Algorithm efficiency, First-class functions
Connections to other domains
- Algorithm needs LoopsControl Flow
- Algorithm efficiency needs Sets in codeData Structures
- Sorting needs First-class functionsFunctions