A sorting algorithm is just a recipe a computer follows over and over. Watch one work, race two against each other, or try to beat them by hand.
Hi, I'm Max! π
Hey, I'm Max! Computers are fast, but they are not clever. To put a pile of bars in order, a computer follows a recipe, one tiny step at a time β look at two bars, ask which one is taller, maybe swap them, then do it again. That recipe is called an algorithm. There are five of them in here, and they all end up with the same tidy row of bars, but some of them take hundreds more steps to get there. Start by watching bubble sort on slow speed until you can predict what it does next. Then hit Race them, put bubble sort up against quick sort, and see just how far behind bubble sort gets. And when you think you understand it, try sorting the bars yourself and see if you can beat the machine. Off you go!