1
impl Solution {
2
pub fn is_toeplitz_matrix(matrix: Vec<Vec<i32>>) -> bool {
3
matrix
4
.windows(2)
5
.all(|w| w[0].iter().take(w[0].len() - 1).eq(w[1].iter().skip(1)))
6
}
7
}

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0