Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/neetcode-gh/leetcode
/ CrossSum
Method
CrossSum
python/1572-matrix-diagonal-sum.py:9–13 ·
view source on GitHub ↗
(self,mat)
Source
from the content-addressed store, hash-verified
7
return
cnt
8
9
def
CrossSum(self,mat):
10
cnt = 0
11
for
i in range(len(mat)):
12
cnt += mat[i][len(mat) - i - 1]
13
return
cnt
14
15
def
diagonalSum(self, mat: List[List[int]]) -> int:
16
prime = self.PrimeSum(mat)
Callers
1
diagonalSum
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected