init
This commit is contained in:
		
							
								
								
									
										13
									
								
								Cactus.py
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								Cactus.py
									
									
									
									
									
								
							@@ -61,6 +61,19 @@ def diag_sort(mat):
 | 
				
			|||||||
		while i < n and j < m:
 | 
							while i < n and j < m:
 | 
				
			||||||
			mat[i][j] = arr.pop(0)
 | 
								mat[i][j] = arr.pop(0)
 | 
				
			||||||
			i, j = i+1, j+1
 | 
								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
 | 
						return mat
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user