Finished selection sort.