We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c0a70c commit 8244861Copy full SHA for 8244861
Insertion Sort/insertion_sort.py
@@ -0,0 +1,7 @@
1
+def InsertionSort(arr):
2
+ for i in range(1, len(arr)):
3
+ for j in range(i, 0, -1):
4
+ if(arr[j-1] <= arr[j]):
5
+ break
6
+ arr[j], arr[j-1] = arr[j-1], arr[j]
7
+ return arr
0 commit comments