luoheng
10/7/2019 - 8:21 AM

isToeplitzMatrix

func isToeplitzMatrix(matrix [][]int) bool {
    for i := 0; i < len(matrix)-1; i++ {
        for j := 0; j < len(matrix[0])-1; j++ {
            if matrix[i][j] != matrix[i+1][j+1] {
                return false
            }
        }
    }
    return true
}