Skip to content

Commit 472bcac

Browse files
authored
Add files via upload
2025/7/18
1 parent 65a5be2 commit 472bcac

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Sorting/Bubble_Sort.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ def Bubble_sort(arr):
1313
#如果swap未標記True,list已完成排序
1414
if not swapped:
1515
break
16-
16+
#main function to test the bubble_sort function
1717
if __name__=="__main__":
1818
arr=[12,10,9,5,7,2,50,1]
1919
print(f"Unsorted list:{arr}")
2020

2121
Bubble_sort(arr)
22-
print(f"Sorted list:{arr}")
22+
print(f"Sorted list(bubble_sort):{arr}")

0 commit comments

Comments
 (0)