selection sort algorithm for integers