Given a two-dimensional matrix of integers matrix, determine whether it's a Toeplitz matrix. A Toeplitz is one where every diagonal descending from left to right has the same value.
Constraints
n, m ≤ 250 where n and m are the number of rows and columns in matrix
Given a two-dimensional matrix of integers matrix, determine whether it's a Toeplitz matrix. A Toeplitz is one where every diagonal descending from left to right has the same value.
Constraints
n, m ≤ 250 where n and m are the number of rows and columns in matrix
Sample Test Case 1
INPUT: matrix = [ [0, 1, 2], [3, 0, 1], [4, 3, 0], [5, 4, 3] ]
OUTPUT: True
Sample Test Case2
INPUT: matrix = [ [1, 0, 0], [0, 0, 0], [0, 0, 1] ]
OUTPUT: False