Wrote a program to sort the array using selection sorting