Driver Code
a = [ [ 1 , 1 , 0 , 0 , 0 ] , [ 0 , 1 , 0 , 0 , 1 ] , [ 1 , 0 , 0 , 1 , 1 ] , [ 0 , 0 , 0 , 0 , 0 ] , [ 1 , 0 , 1 , 0 , 1 ] ] NEW_LINE print ( " Number ▁ of ▁ Islands ▁ is : " , countIslands ( a ) ) NEW_LINE