input: Write a function to sort an array in descending order using selection sort.
  assert selection_sort([3, 8, 5, 2, 6, 4]) == [8, 6, 5, 4, 3, 2]
  assert selection_sort([10, 7, 11, 5, 13]) == [13, 11, 10, 7, 5]
  assert selection_sort([1, 2, 3, 4, 5]) == [5, 4, 3, 2, 1]
output: def selection_sort(arr):
      n = len(arr)
      for i in range(n):
          max_idx = i
          for j in range(i+1, n):
              if arr[j] > arr[max_idx]:
                  max_idx = j
          arr[i], arr[max_idx] = arr[max_idx], arr[i]
      return arr