Quick Sort uses a Pivot Leader to Divide & Conquer! It picks one number as a benchmark leader, splits everyone into two groups (smaller vs larger than the leader), and locks the leader into place.
How it Works Step-by-Step:
1Pick a Leader: Choose one number (the pivot) to serve as the benchmark height.
2Separate into Two Sides: Move all numbers smaller than the leader to the left, and all larger numbers to the right.
3Lock Leader & Repeat: Drop the leader right between the two groups. Now repeat the exact same trick on the left and right groups!
🏫 Real-World Analogy: Playground Line-Up with a Height Leader
Imagine a gym teacher picking one student to stand in the center of the basketball court as the "Pivot Leader". The teacher tells all students shorter than the pivot to stand on the left side, and all taller students to stand on the right. The pivot student is now locked in their exact final sorted position! The teacher then repeats this fast trick on the left and right groups until the entire class is perfectly ordered!