Brute force
Trying every possibility with no cleverness at all. Usually too slow to ship, and almost always the right place to start.
Write the obvious, exhaustive version first. It is quick to write and almost certainly correct, and that makes it your reference: when you write the fast version, you can run both on random inputs and check they agree. Optimised code is where bugs hide, and a known-correct baseline is the cheapest testing you will ever do.
It also tells you whether optimising is needed at all. If the input is never more than fifty items, the brute-force version may simply be the right answer, and time spent making it clever is time wasted.
Where you meet it in real softwareThe first draft of anything, and the correctness check on every optimisation that follows.