Skip to content

adamcumiskey/islands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

islands

Given a grid containing elements in the set #{0 1}, count the total number of connected groups of 1s.

For example the grid:

    0 1 0 0 0
    1 0 0 1 0
    0 0 0 0 0
    0 1 0 0 0
    0 1 1 0 0

has 3 groups: #{(1 0) (0 1)}, #{(3 1)}, and #{(1 3) (1 4) (2 4)}

About

Counting connected components in a 2d array

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published