Min Flips Matrix to Zero
Given an m x n binary matrix, find the minimum number of operations to convert it to all zeros. In one operation, flip a cell and all its adjacent cells (up, down, left, right). Return -1 if impossible.
Given an m x n binary matrix, find the minimum number of operations to convert it to all zeros. In one operation, flip a cell and all its adjacent cells (up, down, left, right). Return -1 if impossible.