FastPrepMax Area of Island
Problems/Max Area of Island

Max Area of Island

Bloomberg LP logoBloomberg LP● MediumNEW GRADONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The report names this well-known problem as a follow-up in the Bloomberg new-grad virtual onsite. We used the standard version: land connects in four directions, and you return the largest island area.

Given a rectangular binary matrix grid, return the maximum area of an island.

An island is a maximal group of 1 cells connected horizontally or vertically. Its area is its number of cells. Return 0 when the grid contains no land.

Function

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

Examples

Example 1

grid = [[0,0,1,0],[1,1,1,0],[0,1,0,1]]return = 5
grid
0123000101111020101

The center island has five cells; the bottom-right cell is a separate area-1 island.

Example 2

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

The matrix has no land.

Example 3

grid = [[1]]return = 1
grid
001

The only cell forms an island of area 1.

Constraints

  • 1 <= grid.length, grid[i].length <= 300.
  • Every row has the same length.
  • Every cell is 0 or 1.

More Bloomberg LP Onsite Interview questions

  • Collatz Conjecture with Shared MemoizationPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Word SearchOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • N-ary Index-Path Encoder and DecoderPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Top K Frequent WordsONSITE INTERVIEW · Seen Nov 2026
  • Trapping Rain WaterPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Design Browser HistoryPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Mutable Stock Price Top KPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Add Two Numbers IIPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Decode StringPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Minimum Replacements to Make Two Strings AnagramsPHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026

Similar questions at other companies

  • Number of Islands with Diagonal ConnectivityGoogle · ONSITE INTERVIEWGoogle interview questions
  • Island Count and Maximum AreaOracle · ONSITE INTERVIEWOracle interview questions
  • Max Area of IslandGoldman Sachs · ONSITE INTERVIEWGoldman Sachs interview questions
  • Max Area of IslandRoku · ONSITE INTERVIEWRoku interview questions
  • Maximum Area of IslandSambaNova Systems · ONSITE INTERVIEWSambaNova Systems interview questions
  • Count Islands in a Binary GridApple · PHONE SCREENApple interview questions
  • Pacific Atlantic Water FlowAnduril · PHONE SCREENAnduril interview questions
  • Maximum Damage PatchGecko Robotics · OA · PHONE SCREEN
  • Maximum Area of IslandSkydio · PHONE SCREENSkydio interview questions
  • Number of IslandsFleetx · ONSITE INTERVIEW

Bloomberg LP interview experiences

  • Bloomberg AI-Assisted Coding Round, All Levels: 14 Experiences
  • Bloomberg SWE Intern Interview Questions: 68 Questions
  • Bloomberg Interview Questions, Level Not Reported: 65 Questions
  • Bloomberg Experienced Design & More: 126 Questions (Part 2 of 2)
  • Bloomberg Experienced SWE Interviews: 167 Questions (Part 1 of 2)
  • Bloomberg New Grad Coding Questions: 121 Questions (Part 2 of 2)
All Bloomberg LP interview questionsSee Bloomberg LP hiring insights
Saved
class Solution {
    public int maxAreaOfIsland(int[][] grid) {
        // Write your code here.
    }

}
Checking account…