Grokking Meta Coding Interview
Ask Author
Back to course home

0% completed

Vote For New Content
Question about test case

charles_hinson

Jul 15, 2023

I don't understand why the perimeter of this island [[1,1,1,1,0,1,1,1,1]] is 10 in the test case, shouldn't it be 20?

0

0

Comments
Comments
Design Gurus
Design Gurus2 years ago

The island consists of the first four 1s [1,1,1,1] as after that there is a zero. If you count all sides, the perimeter is 10.

Were we able to answer your question?

On this page