



"""simple docstring"""






import math




def 			snake_case		(		lowerCAmelCase_  ,						lowerCAmelCase_	)						->				int:
  _snake_case   	=      len(lowerCAmelCase_	)
  _snake_case   	=      int(math.floor(math.sqrt(lowerCAmelCase_	)	)	)
  _snake_case   	=      0
  while arr[min(lowerCAmelCase_  ,						lowerCAmelCase_	) - 1] < x:
    _snake_case   	=      step
    step += int(math.floor(math.sqrt(lowerCAmelCase_	)	)	)
    if prev >= n:
      return -1

  while arr[prev] < x:
    _snake_case   	=      prev + 1
    if prev == min(lowerCAmelCase_  ,						lowerCAmelCase_	):
      return -1
  if arr[prev] == x:
    return prev
  return -1


if __name__ == "__main__":
     snake_case   					=				input('''Enter numbers separated by a comma:\n''').strip()
     snake_case   					=				[int(item) for item in user_input.split(''',''')]
     snake_case   					=				int(input('''Enter the number to be searched:\n'''))
     snake_case   					=				jump_search(arr, x)
     if res == -1:
          print('''Number not found!''')
     else:
          print(F"Number {x} is at index {res}")










"""simple docstring"""






import operator




def 			snake_case		(		lowerCAmelCase_  ,						lowerCAmelCase_ = False  ,						lowerCAmelCase_ = None	)						->				list:
  _snake_case   	=      operator.lt if reverse else operator.gt
  _snake_case   	=      solution or []

  if not arr:
    return solution

  _snake_case   	=      [arr.pop(0	)]
  for i, item in enumerate(lowerCAmelCase_	):
    if _operator(lowerCAmelCase_  ,						sublist[-1]	):
      sublist.append(lowerCAmelCase_	)
      arr.pop(lowerCAmelCase_	)

    #  merging sublist into solution list
  if not solution:
    solution.extend(lowerCAmelCase_	)
  else:
    while sublist:
      _snake_case   	=      sublist.pop(0	)
      for i, xx in enumerate(lowerCAmelCase_	):
        if not _operator(lowerCAmelCase_  ,						lowerCAmelCase_	):
          solution.insert(lowerCAmelCase_  ,						lowerCAmelCase_	)
          break
      else:
        solution.append(lowerCAmelCase_	)

  strand_sort(lowerCAmelCase_  ,						lowerCAmelCase_  ,						lowerCAmelCase_	)
  return solution


if __name__ == "__main__":
     assert strand_sort([4, 3, 5, 1, 2]) == [1, 2, 3, 4, 5]
     assert strand_sort([4, 3, 5, 1, 2], reverse=True) == [5, 4, 3, 2, 1]





