Count the number of 1s islands in a matrix of 0s and 1s.
Given a matrix of 0s and 1s, count the number of 1s islands. An island is a group of 1s that are connected horizontally and vertically, but not diagonally.
# | Size | % | Users |
---|---|---|---|
#1 | 114 c. | Top 9% | |
#2 | 116 c. | Top 18% | |
#3 | 122 c. | Top 27% | |
#4 | 129 c. | Top 36% | |
#5 | 163 c. | Top 55% | |
#6 | 174 c. | Top 64% | |
#7 | 196 c. | Top 73% | |
#8 | 218 c. | Top 82% | |
#9 | 255 c. | Top 91% | |
#10 | 293 c. | Top 100% |