new-member-10
Closed this issue · 1 comments
Deleted user commented
Given an array containing random occurrences of zeros and ones, write a function countOnes(arr) that returns the counts of the sequential ones in the array.
For example:
countOnes([0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1]) // returns [2, 4, 2]
lelloman commented
I'd like to solve this ^_^