def insertionSort(array):
    for i in range(1,len(array)):
        j = i
        while j>0 and array[j]<array[j-1]:
            array[i],array[j] = array[j],array[i]
            j -=1
    return array
    