def insertion_sort(liste, ordre): for i in range(1, len(liste)): key = liste[i] j = i - 1 while j >= 0 and ordre(liste[j], key) == -1: liste[j + 1] = liste[j] j -= 1 liste[j + 1] = key return liste def ordre(a,b): if a>b: return -1 elif a 0 and liste[gauche] = element: return gauche else: return -1