Given a number N and a 2D matrix(N*N filled with 1's or 0's), find the number of island 1's(An island 1 is a 1 surrounded by 0's on all sides).
Input Size : 2 <= N <= 100000
Sample Testcases :
INPUT
2
1 0
0 0
OUTPUT
1
Comments
Please login to comment.