Maximum Island Area

Given a 2D matrix containing only 0 and 1, where 1 represents land and 0 represents water, return the maximum area of an island. Cells are connected only horizontally and vertically, and an is...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: