C-Plus-Plus icon indicating copy to clipboard operation
C-Plus-Plus copied to clipboard

[FEATURE] Number of Islands using DFS algorithm

Open harshagrawal523 opened this issue 3 years ago • 3 comments

Detailed description

Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands.

An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water.

Context

This algorithm opens a wide variety of questions and this is basic need to other questions.

Possible implementation

Using the DFS algorithm and traversing every possible islands to get the number of islands

Additional information

No response

harshagrawal523 avatar Oct 02 '22 06:10 harshagrawal523

@mishraabhinn Please review my PR here

harshagrawal523 avatar Oct 02 '22 07:10 harshagrawal523

please assign this issue to me

thewpingmonk avatar Oct 09 '22 18:10 thewpingmonk

please assign this issue to me

Already taken by @harshagrawal523

mishraabhinn avatar Oct 09 '22 19:10 mishraabhinn

This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Mar 18 '23 00:03 github-actions[bot]

Please ping one of the maintainers once you add more information and updates here. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions!

github-actions[bot] avatar Mar 25 '23 00:03 github-actions[bot]