<a href="https://leetcode.com/problems/island-perimeter/" target="_blank"><i class="fa fa-external-link" aria-hidden="true"> Link -> Island Perimeter</i></a>
Input Format
check the link
Output Format
check the link
Constraints
check the link
Example
Input
4 4 0 1 0 0 1 1 1 0 0 1 0 0 1 1 0 0
Output
16