def insertion_sort(arr):
    n = len(arr)
    for i in range(1, len(arr)):
        key = arr[i]
        j = i - 1
        while j >= 0 and arr[j] > key:
            arr[j + 1] = arr[j]
            j -= 1
        arr[j + 1] = key
    return arr


arr = [4, 2, 8, 6, 4, 1, 0, 15, 4, 3]
print(insertion_sort(arr))

3a63c1336d4a73999221e0a97ad8819637c84d8c
<mask token>

def insertion_sort(arr):
    n = len(arr)
    for i in range(1, len(arr)):
        key = arr[i]
        j = i - 1
        while j >= 0 and arr[j] > key:
            arr[j + 1] = arr[j]
            j -= 1
        arr[j + 1] = key
    return arr


<mask token>

def insertion_sort(arr):
    n = len(arr)
    for i in range(1, len(arr)):
        key = arr[i]
        j = i - 1
        while j >= 0 and arr[j] > key:
            arr[j + 1] = arr[j]
            j -= 1
        arr[j + 1] = key
    return arr


<mask token>
print(insertion_sort(arr))

def insertion_sort(arr):
    n = len(arr)
    for i in range(1, len(arr)):
        key = arr[i]
        j = i - 1
        while j >= 0 and arr[j] > key:
            arr[j + 1] = arr[j]
            j -= 1
        arr[j + 1] = key
    return arr


arr = [4, 2, 8, 6, 4, 1, 0, 15, 4, 3]
print(insertion_sort(arr))
