Island Counter

Count the number of 1s islands in a matrix of 0s and 1s.

Medium1/5/2024

Problem statement

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.

Problem leaderboard

#
Size
%
Users
#1
114 c.
Top 10%
Natanaelel
#2
116 c.
Top 20%
tree
#3
122 c.
Top 30%
Shanethegamer
#4
129 c.
Top 40%
voytxt
#5
163 c.
Top 60%
Thomasdcrt
team
#6
196 c.
Top 70%
maximec-indy
#7
218 c.
Top 80%
scpchicken
#8
255 c.
Top 90%
endevo-mschulz
#9
293 c.
Top 100%
ComputerKWasTaken