2025-07-31 17:16:38 +0300 MSK
Toeplitz Matrix
Links
Code
class Solution:
def isToeplitzMatrix(self, matrix: List[List[int]]) -> bool:
for i in range(1, len(matrix)):
for j in range(1, len(matrix[0])):
if matrix[i-1][j-1] != matrix[i][j]:
return False
return True