input: Write a python function to sort an array using selection sort.
  assert selectionSort([3, 8, 5, 4, 1, 9, 6])==[1, 3, 4, 5, 6, 8, 9]
  assert selectionSort([10, 9, 8, 7, 6, 5, 4, 3, 2, 1])==[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  assert selectionSort([5, 4, 3, 2, 1])==[1, 2, 3, 4, 5]
output: def selectionSort(arr):
      for i in range(len(arr)):
          min_idx = i
          for j in range(i+1, len(arr)):
              if arr[min_idx] > arr[j]:
                  min_idx = j
          arr[i], arr[min_idx] = arr[min_idx], arr[i]
      return arr