Skip to content

Commit 4f9167e

Browse files
committed
Revert "Delete BubbleSort.py"
This reverts commit 5c8c108.
1 parent 685c4d1 commit 4f9167e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
def bubbleSort(lst):
2+
n = len(lst)
3+
4+
for i in range(n-1):
5+
6+
for j in range(0, n-i-1):
7+
8+
9+
if lst[j] > lst[j + 1] :
10+
lst[j], lst[j + 1] = lst[j + 1], lst[j]
11+
12+
lst = [64, 34, 25, 12, 22, 11, 90]
13+
14+
bubbleSort(lst)

0 commit comments

Comments
 (0)