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 6% | |
#2 | 108 c. | Top 13% | |
#3 | 114 c. | Top 19% | |
#4 | 116 c. | Top 25% | |
#5 | 122 c. | Top 31% | |
#6 | 125 c. | Top 38% | |
#7 | 128 c. | Top 44% | |
#8 | 129 c. | Top 56% | |
#9 | 163 c. | Top 69% | |
#10 | 174 c. | Top 75% | |
#11 | 196 c. | Top 81% | |
#12 | 218 c. | Top 88% | |
#13 | 255 c. | Top 94% | |
#14 | 293 c. | Top 100% |