t 7 5 1 2
0 1 2 3
t 1 5 7 2
0 1 2 3
t 1 2 7 5
0 1 2 3
t 1 2 5 7
0 1 2 3
1
Mme jihene chiboub algorithme de tri 4ème Science
2
Mme jihene chiboub algorithme de tri 4ème Science
def tri_Bulle_croissant(n,T):
ok=True
while (ok==True):
ok=False
for i in range (n-1):
if T[i]>T[i+1]:
T[i],T[i+1]=T[i+1],T[i]
ok=True
return T