my-solutions/problems/1582-special-positions-in-a-binary-matrix
2023-03-13 21:37:25 +05:00
..
main.rb Problem 1582: Special positions in a binary matrix 2023-03-13 21:37:25 +05:00
readme.md Problem 1582: Special positions in a binary matrix 2023-03-13 21:37:25 +05:00
test.rb Problem 1582: Special positions in a binary matrix 2023-03-13 21:37:25 +05:00

1582. Special Positions in a Binary Matrix

Given an m x n binary matrix mat, return the number of special positions in mat.

A position (i, j) is called special if mat[i][j] == 1 and all other elements in row i and column j are 0 (rows and columns are 0-indexed).