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 | 104 c. | Top 7% | |
#2 | 108 c. | Top 13% | |
#3 | 114 c. | Top 20% | |
#4 | 116 c. | Top 27% | |
#5 | 122 c. | Top 33% | |
#6 | 128 c. | Top 40% | |
#7 | 129 c. | Top 53% | |
#8 | 163 c. | Top 67% | |
#9 | 174 c. | Top 73% | |
#10 | 196 c. | Top 80% | |
#11 | 218 c. | Top 87% | |
#12 | 255 c. | Top 93% | |
#13 | 293 c. | Top 100% |