Find Min Num Moves
Problem Overview
- Determine the minimum moves (cell color flips) to make every row and column in a grid symmetric.
- Input: N x M array of strings with 'B' and 'w'; Output: integer minimum moves; a row/column is symmetric if it reads the same forward and backward.
- Each move flips one cell; other constraints are not specified.
- Real-world domain: matrix/pattern correction and symmetry in grids.
- From Microsoft interviews; a classic coding interview problem and interview question.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
