First cut of selection sort.