← 返回 uber 的题目列表Max Area of Island
类型:online_judge
Given a grid made up of 0 (water) and 1 (land), find the maximum area of an island. An island is formed by connecting adjacent lands either horizontally or vertically. You can assume all grid borders are water. Write a function to solve for the maximum island area, and try to optimize for large-scale data. Test cases include grids of various sizes and different island layouts.
Example
Input
[[0,1],[1,1]]