← Salesforce questions

Find the size of the largest island in a 2-D matrix

Filed under Salesforce

Given a 2D grid of 0s (water) and 1s (land), find the area of the largest connected group of 1s. Connectivity is defined horizontally and vertically.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Salesforce questions

Collected from public candidate posts and coding forums. Updated Nov 2026.