Sorting, Explained Like You're Five: Quicksort
Line the kids up for a photo again, but this time play a quick game. Pick one kid — call them the "pivot." Everyone shorter, go stand on their left. Everyone taller, go on their right. The moment that's done, the pivot is in exactly the right place forever. That's quicksort.
The whole idea in one sentence
Pick a pivot, shove everything smaller to its left and everything bigger to its right, then play the same game on the left pile and the right pile until every pile is tiny.
Watch it happen
Hit Play. The outlined bar is the pivot; the lit window is the pile being split around it. Watch each pivot snap into its final spot, then the work repeat on smaller and smaller piles.
Why interviewers love it
Quicksort is the sorting algorithm most languages actually use under the hood, so it comes up constantly. It's another divide and conquer approach, but it sorts in place (no second pile needed) and is blisteringly fast in practice. The interesting wrinkle interviewers probe: a bad pivot can make it slow, which is a great doorway into talking about best vs. worst case.
Once a pivot has smaller numbers on its left and bigger on its right, it never has to move again. You've placed one number perfectly and shrunk the problem in half.