input: Write a function to check if an array is contiguous.
  assert is_contiguous([1, 2, 3, 4, 5]) == True
  assert is_contiguous([1, 3, 2, 5, 4]) == True
  assert is_contiguous([1, 2, 4, 5]) == False
  assert is_contiguous([]) == True
output: def is_contiguous(arr):
      if not arr:
          return True
      arr_sorted = sorted(arr)
      for i in range(1, len(arr_sorted)):
          if arr_sorted[i] != arr_sorted[i-1] + 1:
              return False
      return True