Available question text
Given a small m×n (m,n ≤ 3) binary matrix, find the minimum number of operations that flip a chosen cell and its up/down/left/right neighbors to transform the matrix to all zeros, or return -1 if impossible. This is a shortest-path search over the 2^(m·n) state space (use bitmask/BFS reasoning due to the small grid).
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1284. Minimum Number of Flips to Convert Binary Matrix to Zero Matrix
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source