Winter SalePremium questions, over 25% offUnlock all premium questions for over 25% off
Largest Island Perimeter
Medium
You are given an m x n binary grid where each cell is either '1' (land) or '0' (water). A group of connected land cells (connected horizontally or vertically, not diagonally) forms an island. Each land cell contributes to its island's perimeter for every edge that borders water or the grid boundary.
Return the maximum perimeter among all islands in the grid. If there are no islands, return 0.
...
More Google interview questions
- Path Routermedium
- Daily Branch Pruningmedium
- Frequency Merge Treemedium
- Dual Extremes Queuehard
- Longest Match Tokenizermedium
- [CodeSignal] Maximum Zero-Sum Tripletsmedium
- Connected Crop Allocationmedium
- [CodeSignal] Coin Table Gameeasy
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.