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 | 112 c. | Top 8% | |
#2 | 114 c. | Top 17% | |
#3 | 116 c. | Top 25% | |
#4 | 122 c. | Top 33% | |
#5 | 129 c. | Top 42% | |
#6 | 163 c. | Top 58% | |
#7 | 174 c. | Top 67% | |
#8 | 196 c. | Top 75% | |
#9 | 218 c. | Top 83% | |
#10 | 255 c. | Top 92% | |
#11 | 293 c. | Top 100% |