Leetcode 2128. Remove All Ones With Row and Column Flips
Given a binary matrix, determine whether you can make every cell 0 by toggling any subset of whole rows and columns (flipping 0↔1). This is equivalent to finding binary row and column flip vectors r,c with grid[i][j] = r[i] xor c[j], so check that every row is either equal to a reference row or its bitwise complement (consistency check across rows).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.