leetcode1572专题

LeetCode1572. Matrix Diagonal Sum

文章目录 一、题目二、题解 一、题目 Given a square matrix mat, return the sum of the matrix diagonals. Only include the sum of all the elements on the primary diagonal and all the elements on the secondary