Sorting
See why the clever sorts beat the obvious ones.
Sorting progress0 / 10
- Sorting BasicsComparisons, swaps, stability: the vocabulary of order.4m
- Bubble SortSwap neighbours until the big values float to the end.4m
- Selection SortFind the smallest, put it in front, then do it again.4m
- Insertion SortBuild a sorted run, slide each newcomer into place.5m
- Merge SortSplit until trivial, then merge your way back up.6m
- Quick SortPick a pivot, split around it, and never merge.6m
- Counting SortSkip comparisons entirely when the values are small.5m
- Which Sort When?The right sort is the one that fits your data's shape.5m
- Heap SortBuild a heap, then peel the maximum off n times.6m
- Radix SortSort by the last digit first, and never compare a thing.5m
Quiz yourself: 3 questions from this module
1 / 3