HomeSorting Techniques
Sorting Techniques
The classic sorts — watch the bars fall into order.
11 shown
- OverviewWhy sorting matters · stability · in-placeanimatedEasy
- Bubble SortSwap adjacent out-of-order pairsanimatedEasy
- Selection SortPick the smallest, place it in frontanimatedEasy
- Insertion SortInsert each key into a sorted prefixanimatedEasy
- Merge SortDivide, sort halves, mergeanimatedMedium
- Quick SortPartition around a pivotanimatedMedium
- Practice problems
- Insertion SortingGrow a sorted prefix, one card at a timeanimatedEasy
- Merge SortingSplit in half, sort each, zip togetheranimatedMedium
- Recursive Bubble SortOne pass floats the max, then recurseanimatedEasy
- Recursive Insertion SortSort the first n-1, then insert the lastanimatedEasy
- Quick SortingPartition around a pivot, recurse on both sidesanimatedEasy