Search
⌘K

Leetcode 463. Island Perimeter

Given a rectangular grid with exactly one island of orthogonally connected land cells, compute the island's perimeter by summing the edges of land cells that are adjacent to water or the grid boundary (equivalently use 4*land_cells - 2*shared_edges). Grid dimensions ≤100 and connections are only horizontal/vertical.

Asked at:

Google

Google


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Early October, 2024

Google

Google

Junior

Given a rectangle screen and starting at (0,0) coordinate, find the perimeter of the screen

Comments

Your account is free and you can post anonymously if you choose.