Java · 2D arrays, searching and sorting

Selection sort

Binary search needs sorted values, and the plainest way to sort is to pick out the smallest value, again and again.