Mental Model
Quick Sort splits a list into smaller parts around a pivot, sorts each part, then combines them to get a sorted list.
Analogy: Imagine sorting a pile of cards by picking one card as a divider, putting smaller cards on one side and bigger cards on the other, then sorting each side the same way until all cards are in order.
Unsorted list:
[ 8, 3, 7, 6, 2 ]
Choose pivot (e.g., 6):
[ 8, 3, 7, 6, 2 ]
↑
Split into parts:
Left: [3, 2]
Pivot: [6]
Right: [8, 7]