Island Perimeter at Google

Easy74.2% acceptance

This problem has 25.0% frequency at Google.

Problem Description

You are given `row x col` `grid` representing a map where `grid[i][j] = 1` represents land and `grid[i][j] = 0` represents water. Grid cells are connected **horizontally/vertically** (not diagonally). The `grid` is completely surrounded by water, and there is exactly one island (i.e., one or more c...

Read full problem and hints

Topics

Also asked at 9 companies


More Google Questions

View all Google questions