input: Write a function that takes in a list of integers and determines if it's possible to get the list in non-decreasing order by performing any number of right shift operations on the list. If it's possible, return True, otherwise return False. If the list is empty, return True.
  
  assert rotate_to_sort([3, 4, 5, 1, 2]) == True
  assert rotate_to_sort([3, 5, 10, 1, 2]) == True
  assert rotate_to_sort([4, 3, 1, 2]) == False
  assert rotate_to_sort([3, 5, 4, 1, 2]) == False
  assert rotate_to_sort([]) == True
output: def rotate_to_sort(nums):
      if not nums:
          return True
      n = len(nums)
      pivot = 0
      for i in range(1, n):
          if nums[i] < nums[i - 1]:
              pivot = i
              break
      if pivot == 0:
          return True
      for i in range(pivot + 1, n):
          if nums[i] < nums[i - 1]:
              return False
      return nums[-1] <= nums[0]