← 返回 bytedance 的题目列表Max Area of Island
类型:online_judge
Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's connected 4-directionally. You may assume all four edges of the grid are surrounded by water. Find the maximum area of an island.
Example
Input
[[1,0,0,1,1],[0,1,1,0,0],[0,0,0,1,1],[1,1,0,1,0]]