Simple selection sort.