Mental Model
Quick Sort picks a pivot and arranges elements so smaller ones go left and bigger ones go right, then sorts each side the same way.
Analogy: Imagine sorting books on a shelf by picking one book as a reference, putting all smaller books to the left and bigger books to the right, then repeating this for each side until all books are sorted.
Array before sorting: [ 8, 3, 7, 6, 2 ] Pivot chosen -> 2 Partitioning around pivot: [ 2, 3, 7, 6, 8 ] Left side ↑ Right side ↑