Add new course

This commit is contained in:
AndrewTrieu
2023-01-08 18:43:01 +02:00
parent 75313f3f05
commit 6f5c7f67b4
49 changed files with 835669 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
def isort(A):
for i in range(1, len(A)):
j = i-1
while (j >= 0) and (A[j] > A[j+1]):
temp = A[j]
A[j] = A[j+1]
A[j+1] = temp
j = j-1
if __name__ == "__main__":
A = [4, 3, 6, 2, 9, 7, 1, 8, 5]
isort(A)
print(A) # [1, 2, 3, 4, 5, 6, 7, 8, 9]