input: Write a python function to get the median of an array of integers.
  assert get_median([3, 4, 1, 6, 8]) == 4
  assert get_median([10, 20, 30, 40, 50]) == 30
  assert get_median([1, 2, 3, 4, 5, 6]) == 4
output: def get_median(arr):
      arr.sort()
      n = len(arr)
      mid = n // 2
      
      if n % 2 == 0:
          return (arr[mid - 1] + arr[mid]) // 2
      else:
          return arr[mid]