Java · 2D arrays, searching and sorting
Binary search needs sorted values, and the plainest way to sort is to pick out the smallest value, again and again.