Exercise: Sorting Playground
This is a member-only chapter. Log in with your Signal Over Noise membership email to continue.
Log in to readModule 5 · Section 6 of 6
Exercise: Sorting Playground
Reading about algorithms is one thing. Watching them run is different.
Sorting is one of the foundational problems in computer science — and one of the clearest windows into how algorithms think. Given a list of unsorted values, how do you get to a sorted list? The answer depends entirely on the strategy you apply. Bubble sort checks adjacent pairs and swaps them repeatedly. Merge sort splits the list in half, sorts each half, then combines them. Quicksort picks a pivot and partitions everything around it.
Same problem. Different algorithms. Very different speeds — especially as the list gets longer.
Go to the Sorting Playground and spend 10–15 minutes here:
thinklikeacoder.org/resources/sorting-playground/
Try at least three different algorithms on the same data set. Watch how each one moves through the problem. Notice which ones look chaotic before they converge on the answer, and which ones look methodical throughout. Pay attention to how the number of steps changes when you increase the list size.
What to take away: When you write a prompt, you’re choosing a strategy — not just providing a goal. “Summarise this document” and “Extract the five most important decisions from this document and list them in order of business impact” are both asking AI to process the same input. But they specify very different algorithms. One produces a general overview. The other applies a specific sorting and prioritisation strategy.
The professionals who get consistent results from AI aren’t just clearer about what they want. They’re clearer about the process they want AI to follow. Sorting algorithms show you why process specification matters: the strategy you choose changes everything about the output.