leetcode

Description:

leetcode-766

Submission:

1
2
3
4
5
6
7
8
class :
def isToeplitzMatrix(self, matrix: List[List[int]]) -> bool:
r = len(matrix)
c = len(matrix[0])
for i in range(r-1):
if (matrix[i][:c-1] != matrix[i+1][1:c]):
return False
return True

Acceptance:

ac