




from itertools import compress, repeat
from math import ceil, sqrt




def    __SCREAMING_SNAKE_CASE				(					lowercase_ )    ->		list[int]:

    """simple docstring"""


    if num <= 2:
        return []
    if num == 3:
        return [2]

    # Odd sieve for numbers in range [3, num - 1]
    __UpperCamelCase											=  bytearray(b'''\x01''' ) * ((num >> 1) - 1)

    for i in range(3   ,       int(sqrt(lowercase_ ) ) + 1   ,       2 ):
        if sieve[(i >> 1) - 1]:
            __UpperCamelCase											=  i**2
            __UpperCamelCase											=  repeat(
                0   ,       ceil((num - i_squared) / (i << 1) ) )

    return [2] + list(compress(range(3   ,       lowercase_   ,       2 )   ,       lowercase_ ) )


if __name__ == "__main__":
 import doctest

 doctest.testmod()












def    __SCREAMING_SNAKE_CASE				(					lowercase_ )    ->		list:

    """simple docstring"""


    __UpperCamelCase											=  len(lowercase_ )

    # 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(lowercase_   ,       len(lowercase_ ) ):
            __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()






