Search
⌘K

Leetcode 695. Max Area of Island

Given an m×n binary grid, find the maximum area (number of cells) of a 4-directionally connected component of 1s (an island), returning 0 if none exist. This is a standard grid connected-components / flood-fill problem (solvable with DFS/BFS/Union-Find) with m,n ≤ 50.

Asked at:

Amazon

Amazon

LinkedIn

LinkedIn

Oracle


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Mid December, 2025

Oracle

Senior

You are given an m x n binary matrix grid. An island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surrounded by water. The area of an island is the number of cells with a value 1 in the island. Return the maximum area of an island in grid. If there is no island, return 0.

Early October, 2025

LinkedIn

LinkedIn

Senior

Mid December, 2024

Amazon

Amazon

Mid-level

Find the max area of an island with a given starting point and obstacles that cannot be passed

Comments

Your account is free and you can post anonymously if you choose.