'''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       :     str			):
 __UpperCAmelCase         =					5381
 for x in s:
  __UpperCAmelCase         =					((hash_value << 5) + hash_value) + ord(lowerCAmelCase			)
 return hash_value & 0Xffff_ffff



