FastPrepMaximum Island Area
Problems/Maximum Island Area

Maximum Island Area

Intuit logoIntuit● MediumNEW GRADOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in an Intuit new grad online assessment. The report names the well-known maximum island area problem as its online assessment question.

The report does not repeat the statement. This version uses the named task: find the largest four-neighbor land component in a binary matrix, with zero for no land.

Our version is about 95% the same as the named exercise.

In the binary matrix grid, 1 represents land and 0 represents water. Land cells belong to the same island when they connect through shared sides. Diagonal contact does not join islands.

Return the greatest number of land cells in any one island. If the matrix contains no land, return 0. The area outside the matrix is water.

Function

maxAreaOfIsland(grid: int[][]) → int

Examples

Example 1

grid = [[1,1,0],[0,1,0],[0,0,1]]return = 3
grid
012011010102001

The top-left island contains cells (0,0), (0,1), and (1,1), for area 3. Cell (2,2) forms a separate area-one island because it touches that island only diagonally.

Example 2

grid = [[0,0],[0,0]]return = 0
grid
01000100

Every cell is water, so there is no island and the answer is 0.

Constraints

  • 1 <= grid.length <= 50.
  • Every row has the same length, from 1 to 50.
  • Every cell is either 0 or 1.

More Intuit Online Assessment questions

  • Employee Promotion OpportunitiesOA · Seen Oct 2026
  • Next Pascal Row CoefficientOA · Seen Oct 2026
  • Parse Router LogsOA · Seen Oct 2026
  • Longest Repeated Letter Block with Adjacent SwapsOA · Seen Oct 2026
  • Maximum Square-Free DivisorOA · Seen Oct 2026
  • Two Tribes from Taller-Person CountsOA · Seen Oct 2026
  • Shortest Path from an Encoded GraphOA · Seen Sep 2026
  • Oldest and Youngest EmployeesOA · Seen Sep 2026
  • Pressure-Isolation Shutdown OrderOA · Seen Sep 2026
  • Submask Sum QueriesOA · Seen Sep 2026

Similar questions at other companies

  • Minimum Cleaning Robot RunsHSBC · OAHSBC interview questions
  • Count Islands with DFS and BFSVisa · OAVisa interview questions
  • Number of IslandsGoldman Sachs · OA · PHONE SCREEN · ONSITE INTERVIEWGoldman Sachs interview questions
  • House Bounds in a Ragged GridRippling · OA · PHONE SCREENRippling interview questions
  • Maximum Damage PatchGecko Robotics · OA · PHONE SCREEN
  • Number of IslandsAmazon · PHONE SCREEN · ONSITE INTERVIEW
  • Shortest Bridge Between Two IslandsCompass International Holdings · ONSITE INTERVIEWCompass International Holdings interview questions
  • Max Area of Island Without Changing the GridFlexport · PHONE SCREENFlexport interview questions
  • Number of Islands with Diagonal ConnectivityGoogle · ONSITE INTERVIEWGoogle interview questions
  • Island Count and Maximum AreaOracle · ONSITE INTERVIEWOracle interview questions

Interview reports that mention this question

  • Intuit OA: What It Tests (2026)

Intuit interview experiences

  • Intuit Software Engineering Intern - Full Stack OA Format
All Intuit interview questionsSee Intuit hiring insights
Saved
class Solution {
    public int maxAreaOfIsland(int[][] grid) {
        // Write your code here
    }
}
Checking account…