We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e11640 commit 8d2fe75Copy full SHA for 8d2fe75
1 file changed
Sorting/Insertion_Sort.py
@@ -10,8 +10,9 @@ def InsertionSort(arr):
10
j-=1
11
arr[j+1]=key #insertion key到正確的位置
12
13
+#main function to test the insertion_sort function
14
if __name__=="__main__":
15
arr=[20,15,10,30,7,6,5]
16
print(f"Unsorted List:{arr}")
17
InsertionSort(arr)
- print(f"Sorted List:{arr}")
18
+ print(f"Sorted List(insertion_sort):{arr}")
0 commit comments