Bugsy
Explains
3 hearts left

Sorting

New idea

Why sort at all?

Binary search is brilliant, but only on a sorted array. So before we can search fast, we need a way to put things in order. That's sorting.

Sorting takes some work, but you only pay for it once. After that, every search is fast, so it pays off when you search the same array many times.

Bubble sort is the simplest way. Look at two neighbours. If the left one is bigger, swap them. Then move one step right and do it again.

Why "bubble"? The biggest value keeps getting swapped to the right, so it floats to the end of the array like a bubble.