init
This commit is contained in:
parent
307d75006a
commit
6ba936e7ba
13
Cactus.py
13
Cactus.py
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user