Find perimeter of an Island | Techie Delight
Briefly

Given a binary matrix in which the values 0 and 1 correspond to land and water, respectively, and the connected ones form exactly one island, find the perimeter of an island.Assume that there are no lakes on the island, and all the ones that exist are connected only vertically or horizontally, not diagonally.
Read at Techie Delight
[
add
]
[
|
|
]