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