You are given an mat and an integer k.
In one cyclic shift:
Rows at even indices are cyclically shifted to the left by
Rows at odd indices are cyclically shifted to the right by
After repeating this process k times on mat, return true if the final matrix is identical to the original matrix mat, and false otherwise.
Constraints:
mat.length
mat[i].length
mat[i][j]
k
You are given an mat and an integer k.
In one cyclic shift:
Rows at even indices are cyclically shifted to the left by
Rows at odd indices are cyclically shifted to the right by
After repeating this process k times on mat, return true if the final matrix is identical to the original matrix mat, and false otherwise.
Constraints:
mat.length
mat[i].length
mat[i][j]
k