From 361e90d97cf3d0254fd9f98d6719a02cfbe0a16e Mon Sep 17 00:00:00 2001 From: Beibin Li Date: Tue, 2 Jan 2024 09:54:59 -0800 Subject: [PATCH] Remove accidental added file --- notebook/coding/bubble_sort.py | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 notebook/coding/bubble_sort.py diff --git a/notebook/coding/bubble_sort.py b/notebook/coding/bubble_sort.py deleted file mode 100644 index 72076eea17c..00000000000 --- a/notebook/coding/bubble_sort.py +++ /dev/null @@ -1,18 +0,0 @@ -# filename: bubble_sort.py -def bubble_sort(array): - length = len(array) - - for i in range(length - 1): - swapped = False - for j in range(0, length - i - 1): - if array[j] > array[j + 1]: - array[j], array[j + 1] = array[j + 1], array[j] - swapped = True - if not swapped: - break - - return array - - -array = [4, 1, 3, 5, 2] -print(bubble_sort(array))