Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Max Area of Island

Print the area (number of cells) of the largest 4-connected island of 1s in the grid, or 0 if there is none.

Constraints

1 <= R, C <= 50

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.