Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Binary Islands

Given a 2D array of 1's and 0's, count the number of "islands of 1s". (eg. groups of connecting 1s)

binary_islands([[0,0,0,0,0,1],
                [0,0,1,1,0,0],
                [0,0,0,0,0,0]]) # > 2