Help with error

code: https://ide.codingblocks.com/s/481067

problem: calculate size of consecutive 1’s

for the test case the required answer is = [1,2,2,2,5] (order doesn’t matter).
the problem is similar to number of islands.
I think there is some minor mistake but not able to find it.

hello @raghav007

pls raise the doubt from the problem page itself.

there is no page for this problem

should I raise it from graphs lecture?