input: Write a function to determine if it is possible to sort a given array in non-decreasing order by performing any number of right shift operations, and return True if it is possible, otherwise return False. If the input array is empty, return True.
  
  class StringComparator:
  
  def __init__(self, string1, string2):
   self.string1 = string1
   self.string2 = string2
  
  def is_equal(self):
   return self.string1 == self.string2
  
  def is_different(self):
   return self.string1 != self.string2
  
  def is_similar(self, threshold=0.5):
   distance = edit_distance(self.string1, self.string2)
   max_length = max(len(self.string1), len(self.string2))
  
   return distance / max_length < threshold
  
  assert StringComparator("hello", "hello").is_equal()==True
  assert StringComparator("hello", "world").is_equal()==False
  assert StringComparator("hello", "world").is_different()==True
  assert StringComparator("hello", "hella").is_similar()==True
  assert StringComparator("hello", "world").is_similar()==False
output: 
  def can_be_sorted_by_shifts(arr):
      if not arr:
          return True
      n = len(arr)
      count = 0
      for i in range(n):
          if arr[i] > arr[(i + 1) % n]:
              count += 1
          if count > 1:
              return False
      return True
  