Sorting Algorithms
Watch comparisons and swaps put data in order.
- Beginnerβ
Bubble Sort
Swap neighbours until nothing moves
O(nΒ²)β
- Beginnerβ
Selection Sort
Select the minimum, grow the sorted region
O(nΒ²)β
- Beginner
Insertion Sort
Insert each card into a sorted hand
O(nΒ²)β
- Intermediate
Merge Sort
Divide, conquer, merge
O(n log n)β
- Intermediate
Quick Sort
Partition around a pivot
O(n log n) averageβ
- Advanced
Heap Sort
Sort with a max-heap
O(n log n)β