input: Write a python function to sort an array using selection sort algorithm.
  assert selection_sort([76, 25, 16, 15, 88]) == [15, 16, 25, 76, 88]
  assert selection_sort([3, 1, 4, 1, 5, 9, 2, 6, 5]) == [1, 1, 2, 3, 4, 5, 5, 6, 9]
  assert selection_sort([10, 7, 8, 9, 1, 5]) == [1, 5, 7, 8, 9, 10]
output: def selection_sort(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