Skip to content
This repository was archived by the owner on Sep 22, 2021. It is now read-only.

1284- Minimum Number of Flips to Convert Binary Matrix to Zero Matrix #768

Closed
suman2826 opened this issue Oct 13, 2020 · 2 comments
Closed
Assignees

Comments

@suman2826
Copy link
Contributor

Description of the Problem

Given a m x n binary matrix mat. In one step, you can choose one cell and flip it and all the four neighbours of it if they exist (Flip is changing 1 to 0 and 0 to 1). A pair of cells are called neighboors if they share one edge.

Return the minimum number of steps required to convert mat to a zero matrix or -1 if you cannot.

Binary matrix is a matrix with all cells equal to 0 or 1 only.

Zero matrix is a matrix with all cells equal to 0.

Example 1:
Input: mat = [[0,0],[0,1]]
Output: 3

Link To The LeetCode Problem

LeetCode

@suman2826
Copy link
Contributor Author

I would like to be assigned to this issue, Thank you!

@vJechsmayr
Copy link
Owner

@suman2826 Waiting for your PR 😸

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants