input: Write a function to determine if it is possible to get an array sorted in non-decreasing order by performing any number of right shift operations on the given array. If it is possible return True else return False. If the given array is empty then 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("kitten", "sitting").is_similar(threshold=0.4) == False
  assert StringComparator("kitten", "sitting").is_similar(threshold=0.7) == True
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