sort the array using selection sort