From 98ae4b1e5bbe9abd72b2b80a5c6baac7c30f2ed0 Mon Sep 17 00:00:00 2001 From: SimonSayeBabu Date: Tue, 26 Nov 2024 11:54:42 +0100 Subject: [PATCH] correction --- exo4.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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]]