input: Write a python function to sort an array using selection sort algorithm.
  assert selection_sort([5, 8, 10, 15, 2]) == [2, 5, 8, 10, 15]
  assert selection_sort([64, 25, 12, 22, 11]) == [11, 12, 22, 25, 64]
  assert selection_sort([3, 0, -1, 8, 7, 2, 5, 4]) == [-1, 0, 2, 3, 4, 5, 7, 8]
output: def selection_sort(arr):
      for i in range(len(arr)):
          min_idx = i
          for j in range(i+1, len(arr)):
              if arr[j] < arr[min_idx]:
                  min_idx = j
          arr[i], arr[min_idx] = arr[min_idx], arr[i]
      return arr