7 kyu

Counter of neighbor ones

873 of 1,559mlyundin

Description:

Task

Tranform of input array of zeros and ones to array in which counts number of continuous ones. If there is none, return an empty array

Example

[1, 1, 1, 0, 1] -> [3,1]
[1, 1, 1, 1, 1] -> [5]
[0, 0, 0, 0, 0] -> []
Algorithms
Fundamentals

Similar Kata:

More By Author:

Check out these other kata created by mlyundin

Stats:

CreatedMar 18, 2016
PublishedMar 18, 2016
Warriors Trained2510
Total Skips29
Total Code Submissions4465
Total Times Completed1559
Python Completions873
Ruby Completions65
JavaScript Completions622
C Completions35
COBOL Completions4
Haskell Completions30
Total Stars27
% of votes with a positive feedback rating92% of 321
Total "Very Satisfied" Votes274
Total "Somewhat Satisfied" Votes43
Total "Not Satisfied" Votes4
Total Rank Assessments9
Average Assessed Rank
7 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • mlyundin Avatar
  • suic Avatar
  • JohanWiltink Avatar
  • FArekkusu Avatar
  • trashy_incel Avatar
  • ejini战神 Avatar
  • akar-0 Avatar
  • farhanaditya Avatar
Ad