Skip to content

pandasanjay/go_find_island_problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

#Find the Number of Islands

Given a 2-dimensional grid consisting of 1's (land blocks) and 0's (water blocks), count the number of islands present in the grid. The definition of an island is as follows:

  • Must be surrounded by water blocks.
  • Consists of land blocks (1's) connected to adjacent land blocks (either vertically or horizontally). Assume all edges outside of the grid are water.
Example:
Input: 
10001
11000
10110
00000

Output: 3

About

Find the Number of Islands

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages