Pick a pivot, scan with j growing the ≤ pivot region behind i, then place the pivot. Watch each partition spawn left/right subproblems.
step 0
Array & current partition
Pivot = ?. Scanning subarray [lo..hi]; grow the ≤-pivot region.
pivot / placed ≤ pivot > pivot active range [lo..hi]
Recursion tree
Press Step to begin. We partition the active range around the pivot, then recurse into the smaller subproblems. No merge step is needed.
Self-contained visualization. Lomuto partition (pivot moved to the end), counting comparisons and swaps.
The pivot lands in its final sorted position each partition. See junior.md and professional.md for the loop-invariant proof and the average-case analysis.