This commit is contained in:
DerGrumpf 2024-09-13 14:26:12 +02:00
parent 307d75006a
commit 6ba936e7ba
2 changed files with 14 additions and 1 deletions

View File

@ -61,6 +61,19 @@ def diag_sort(mat):
while i < n and j < m:
mat[i][j] = arr.pop(0)
i, j = i+1, j+1
new = []
for y in range(len(mat)):
arr = []
for x in range(len(mat)):
arr.append(mat[x][y])
new.append(insertion_sort(arr))
quick_print("")
for el in new:
quick_print(el)
return mat

File diff suppressed because one or more lines are too long