forked from menault/TD4_DEV51_Qualite_Algo
correction
This commit is contained in:
parent
dff190a508
commit
98ae4b1e5b
4
exo4.py
4
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]]
|
||||
|
Loading…
Reference in New Issue
Block a user