'''simple docstring'''




def 						__snake_case (       lowerCAmelCase       :     list			):
 __UpperCAmelCase         =					len(lowerCAmelCase			)

 # Set the gap value to be decreased by a factor of 1.3
 # after each iteration
 __UpperCAmelCase         =					1.3

 # Continue sorting until the gap is 1
 while gap > 1:
  # Decrease the gap value
  __UpperCAmelCase         =					int(gap / shrink			)

  # Sort the elements using insertion sort
  for i in range(lowerCAmelCase      ,  len(lowerCAmelCase			)			):
   __UpperCAmelCase         =					collection[i]
   __UpperCAmelCase         =					i
   while j >= gap and collection[j - gap] > temp:
    __UpperCAmelCase         =					collection[j - gap]
    j -= gap
   __UpperCAmelCase         =					temp

 return collection


if __name__ == "__main__":
     import doctest

     doctest.testmod()




'''simple docstring'''




def 						__snake_case (       lowerCAmelCase       :     list			):

 for insert_index, insert_value in enumerate(collection[1:]			):
  __UpperCAmelCase         =					insert_index
  while insert_index >= 0 and insert_value < collection[insert_index]:
   __UpperCAmelCase         =					collection[insert_index]
   insert_index -= 1
  if insert_index != temp_index:
   __UpperCAmelCase         =					insert_value
 return collection


if __name__ == "__main__":
     from doctest import testmod

     testmod()

     _UpperCamelCase				:		List[Any]       			=		input('Enter numbers separated by a comma:\n').strip()
     _UpperCamelCase				:		List[Any]       			=		[int(item) for item in user_input.split(',')]
     print(f"{insertion_sort(unsorted) = }")



