Number of Islands using DFS [Hacktoberfest]
harshagrawal523 opened this issue · comments
Harsh Agrawal commented
This is a(n):
- New algorithm
- Update to an existing algorithm
- Error
- Proposal to the Repository
Details:
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.
Harsh Agrawal commented
Suprity Sinha commented
Hey @OpenGenus I want to add an efficient approach to your problem. Can you please assign this to me.