Simple Python 8 line complete solution


#1

class Solution:
def diagonal(self, A):
mxrow = 2*len(A)-2
mat = [[] for i in range(mxrow+1)]
for i in range(len(A)):
for j in range(len(A)):
mat[i+j].append(A[i][j])
return mat


#2

COMPLEXITY IS high but good approach