FreeCareerPath
Build the PrimitiveMedium

Max Area of Island

Write `max_area_of_island(grid)` returning the number of cells in the largest connected group of `1`s, or `0` when there is no land. The grid holds integers. Identical traversal to Number of Islands — the only change is that the flood counts the cells it visits and returns that, and the outer loop keeps a running maximum.

What to expect: A timer starts when you begin. Edit the starter code, run it against the test suite as many times as you like, then finish when you're done. The reference solution and interviewer follow-up questions unlock only after you finish.

Log in to start this session

Timed sessions and your results for "Max Area of Island" are saved to your account — logging in takes a few seconds.

Max Area of Island — FreeCareerPath