-
Notifications
You must be signed in to change notification settings - Fork 308
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
Islands in a Graph #94
Comments
I think 4th row is incomplete |
@ramitsawhney27 it would be really helpful if you update the fourth line of the test case |
@h-sinha @moulikcipherX fixed. |
Shouldn't the number of pools be 1 in this case? As the '.' in 4th row has a '.' on one side. |
The two pools are in row 2 and row 4 of size 2 and 1 respectively. The one in the 5th row is not counted. |
@ramitsawhney27 Will like to work on this! |
This is still open, right? |
Challenge problems are open for anyone. Whosoever solves and sends the PR earliest, will get the points. |
Yeah I meant to ask whether it has been solved already or not |
Not yet |
How is the one in the 4th row even a pool? It's not surrounded by red on all sides.. |
I just realized, markdown messes up how it's being shown. Something to do with the \ and *. I've edited it. Ideally, the . should be on the 3rd column in the 4th row. Then the solution is correct for what was given previously. |
Okay, and diagonally blue is okay for a pool? |
Just keep it as up down left right (4-connectivity) for simplicity. |
This is solved, closing it. |
Given:
A grid of size n x m. Each cell is either Red or Blue. Red is denoted as * and . as Blue.
The entire grid is surrounded in blue.
A collection of blue cells surrounded by red on all sides is considered a pool.
Tasks:
Sample:
5 4
****
*..*
****
*.**
..**
Number of pools: 1; size = 2
The text was updated successfully, but these errors were encountered: