2319. Check if Matrix Is X-Matrix
Problem
Problem_Link
My Attempt
Brainstorming
X-Matrix
All the elements in the diagonals of the matrix are non-zero.
All other elements are 0.
So, it need to have 0 in all positions.
num, 0,0,0,num
0,num,0,num,0
0,0,num,0,0
0,num,0,num,0
num...
eunhanlee.hashnode.dev3 min read