##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
Sorting turns chaos into order. Once sorted, you can binary search, merge efficiently, and simplify many problems.
Why sorting is the foundation of algorithmic problem solving.
The problems sorting solves and the techniques it enables.
What stability means and when it matters.
Find the minimum and swap it to the front.
Implementation and analysis.
Insert each element into its sorted position.
Implementation and analysis.
Test your understanding
Divide, sort halves, merge.
How to merge two sorted arrays.
Implementation and analysis.
Partition around a pivot, then sort subarrays.
The Lomuto partition scheme.
Full implementation and analysis.
Test your understanding
When to use each comparison-based sort.
Why comparison sorts cannot beat $O(n \log n)$.
Test your understanding
Count occurrences, reconstruct the array.
Implementation and analysis.
Sort digit by digit, from least to most substantial.
Implementation and analysis.
Conditions for counting sort and radix sort.
Test your understanding
When to use built-in sorts.
Sorting by custom criteria.
Test your understanding
Start leaning basics.
Start leaning basics.
Start leaning basics.
Start leaning basics.
Start leaning basics.
Start leaning basics.
Test your understanding
Start leaning basics.
Start leaning basics.
Start leaning basics.
Start leaning basics.
Start leaning basics.
Start leaning basics.
Start leaning basics.
Start leaning basics.
Start leaning basics.
Test your understanding
Summary of sorting algorithms and when to use each.