Given an mat, return the total number of special positions in mat.
A position (i, j) is considered special if mat[i][j] is equal to i and column j is equal to
Constraints:
m == mat.length
n == mat[i].length
m, n
mat[i][j] is either
Given an mat, return the total number of special positions in mat.
A position (i, j) is considered special if mat[i][j] is equal to i and column j is equal to
Constraints:
m == mat.length
n == mat[i].length
m, n
mat[i][j] is either