Minimum Number of Flips to Convert Binary Matrix to Zero Matrix
Encode the matrix as a bit mask and run BFS over masks, where each flip toggles a cell and its neighbours.
Encode the matrix as a bit mask and run BFS over masks, where each flip toggles a cell and its neighbours.