Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LeetCode Problem]: Rotting Oranges - DFS #574

Closed
1 task done
AnantDuhan opened this issue Oct 2, 2021 · 1 comment
Closed
1 task done

[LeetCode Problem]: Rotting Oranges - DFS #574

AnantDuhan opened this issue Oct 2, 2021 · 1 comment

Comments

@AnantDuhan
Copy link
Contributor

AnantDuhan commented Oct 2, 2021

https://leetcode.com/problems/rotting-oranges/

Description:

You are given an m x n grid where each cell can have one of three values:

0 representing an empty cell,
1 representing a fresh orange, or
2 representing a rotten orange.
Every minute, any fresh orange that is 4-directionally adjacent to a rotten orange becomes rotten.

Return the minimum number of minutes that must elapse until no cell has a fresh orange. If this is impossible, return -1.

Language

C++

Domain

Arrays

Type of Contribution

Code

Code of Conduct

  • I follow Contributing Guidelines & Code of conduct.
@AnantDuhan
Copy link
Contributor Author

/assign this to me

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

No branches or pull requests

1 participant