diff --git a/exo4.py b/exo4.py index ce0c4b4..776ae90 100644 --- a/exo4.py +++ b/exo4.py @@ -11,6 +11,8 @@ def bublesort_multi_array(array): array[i] = temp swap += 1 return array +# O(n²+n²) +# = O(n²) def sort_bubble_array(array): #merci votre td1 swap = 1 @@ -22,7 +24,7 @@ def sort_bubble_array(array): #merci votre td1 array[i-1]= array[i] array[i] = temp swap += 1 - +#O(n²) # testt array = [[0, 3, 2], [9, 4, 5], [4, 1, 3]]