import random


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


input_list = [random.randrange(1, 50, 1) for _ in range(30)]
insertion_sort(input_list)

355924be0b30da294e9ab8c4047bb1b598d3f17f
<mask token>

<mask token>


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


<mask token>
insertion_sort(input_list)

<mask token>


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


input_list = [random.randrange(1, 50, 1) for _ in range(30)]
insertion_sort(input_list)

import random


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


input_list = [random.randrange(1, 50, 1) for _ in range(30)]
insertion_sort(input_list)
