Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 655 Bytes

island.md

File metadata and controls

29 lines (24 loc) · 655 Bytes

Islands

  • You are given a map of volcanic islands
  • Water is denoted by a "."
  • Islands are denoted by groupings of 0s
  • Write a method that will calculate the number of islands on the map

Example:

............................
........000........0........
.....000000........0.......0
.......000000......0......00
...........................0
.000.........00000..........
.00.........................
.00.........0...............
.........000.........0......
.........000........000.....
.........000.........0......
................00..........
.00.............00..........
...........................0

# of islands = 10

input: 2d array