LeetCode Solutions/October 2022 LeetCoding Challenge/Toeplitz Matrix.java
<gh_stars>0class Solution {
    public boolean isToeplitzMatrix(int[][] matrix) {
        for (int i=1; i<matrix.length; i++){
            for (int j=1; j<matrix[0].length; j++){
                if (matrix[i-1][j-1] != matrix[i][j]){
                    return false;
                }
            }
        }
        return true;
    }
}