input: Write a python function to detect if there is a cycle in the array.
  assert is_cycle_detected([1, 2, 3, 4, 5]) == False
  assert is_cycle_detected([1, 2, 3, 1]) == True
  assert is_cycle_detected([4, 1, 2, 3, 4]) == True
  assert is_cycle_detected([1, 2, 3, 4, 0]) == False
output: def is_cycle_detected(arr):
      slow = 0
      fast = 0
      n = len(arr)
      
      while True:
          slow = (slow + arr[slow]) % n
          fast = (fast + arr[fast]) % n
          fast = (fast + arr[fast]) % n
          
          if slow == fast:
              return True
          if fast == (fast + arr[fast]) % n:
              break
      
      return False