LeetCode: Matrix Diagonal Sum
Problem:
https://leetcode.com/problems/matrix-diagonal-sum/description/
Code:
class Solution:
def diagonalSum(self, mat: List[List[int]]) -> int:
"""
Sum of Primary & Seconday elements, not repeating middle element.
"""
...
is-power-of-two.hashnode.dev1 min read