✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Considérons l’algorithme suivant (tri par insertion) :
def tri(array): n = len(array)
for i in range(1, n):
key = array[i]
j = i -
1
while j >= 0 and array[j] > key:
array[j +
1] = array[j]
j = j -
1 array[j +
1] = key
print(array)
return array
Quelle est la complexité temporelle
dans le pire cas ?Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!