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