I have added a problem to find the maximum area of the island in a matrix using depth-first search algorithm for graph traversal.
You are given an m x n binary matrix grid. An island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surrounded by water.
The area of an island is the number of cells with a value 1 in the island.
Return the maximum area of an island in grid. If there is no island, return 0.
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
This PR is stale because it has been open 3 days with no activity. Please commit the changes requested or make improvements on the code. Thank you for your contributions!
Related Issue
1558
Proposed Changes
Additional Info
Checklist
I have added a problem to find the maximum area of the island in a matrix using depth-first search algorithm for graph traversal.
You are given an m x n binary matrix grid. An island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surrounded by water.
The area of an island is the number of cells with a value 1 in the island.
Return the maximum area of an island in grid. If there is no island, return 0.
Output Screenshots