Array
1582. Special Positions in a Binary Matrix
A position (i,j) is "special" if mat[i][j] == 1 and it's the only 1 in both its row and its column. Count special positions. Precompute per-row and per-column 1-counts, then a position is special iff…
Loading…