Mental Model
Quick Sort splits the list into smaller parts around a pivot, sorts each part, and 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 separately before putting all cards back together.
Unsorted array: [7, 2, 5, 3, 9] Pivot chosen (e.g., 5): [7, 2, 5, 3, 9] ↑pivot Split into parts: [2, 3] 5 [7, 9] Sort parts separately and combine: [2, 3, 5, 7, 9]
