leecode
2020重新做人
这个作者很懒,什么都没留下…
展开
-
[leecode]Python:766 Toeplitz Matrix托普利茨矩阵
如果一个矩阵的每一方向由左上到右下的对角线上具有相同元素,那么这个矩阵是托普利茨矩阵。给定一个 M x N 的矩阵,当且仅当它是托普利茨矩阵时返回 True。示例1输入: matrix = [ [1,2,3,4], [5,1,2,3], [9,5,1,2]]输出: True解释:在上述矩阵中, 其对角线为:"[9]", "[5, 5]", "[1, 1, 1]", &am原创 2019-02-27 10:20:22 · 457 阅读 · 0 评论 -
[leecode]Python:566. Reshape the Matrix 重塑矩阵
In MATLAB, there is a very useful function called ‘reshape’, which can reshape a matrix into a new one with different size but keep its original data.You’re given a matrix represented by a two-dimens...原创 2019-02-27 10:00:13 · 553 阅读 · 0 评论