topic:
2319. Determine whether the matrix is one X matrix
Thought:
GolangPure violence,PythonLearn Spirit God
The downward bidding on the main diagonal needs to be satisfied:i=j
Opposition to the corner line is satisfied:i+j=n−1
Code:
1 | class Solution: |
1 | func checkXMatrix(grid [][]int) bool { |