GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — leetcode/python/766_Toeplitz_Matrix.py at master · qiyuangong/leetcode Expand file tree/ Copy path766_Toeplitz_Matrix.pyMore file actions 12 lines (12 loc) · 413 Bytes / Copy path766_Toeplitz_Matrix.pyFile metadata and controls12 lines (12 loc) · 413 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 class Solution(object): def isToeplitzMatrix(self, matrix): """ :type matrix: List[List[int]] :rtype: bool """ # Actually, we don't need to check the last row and column for r in range(len(matrix) - 1): for c in range(len(matrix[0]) - 1): if matrix[r][c] != matrix[r + 1][c + 1]: return False return True |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |