7 kyu
ONE ONe One one
678 of 681joh_pot
Description:
Write
function consecutiveOnes(nums) {}
that takes in array nums
and returns the maximum consecutive 1's
For example
consecutiveOnes([1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0]) === 3
consecutiveOnes([1, 1, 0, 0, 1]) === 2
consecutiveOnes([0, 0, 0, 0, 0]) === 0
PLEASE NOTE THAT THIS KATA HAS HEAVY PERFORMANCE TESTS AND YOU NEED OPTIMIZED CODE TO PASS IT
Arrays
Performance
Fundamentals
Stats:
Created | Jan 27, 2017 |
Published | Jan 27, 2017 |
Warriors Trained | 1423 |
Total Skips | 29 |
Total Code Submissions | 3440 |
Total Times Completed | 681 |
JavaScript Completions | 678 |
COBOL Completions | 6 |
Total Stars | 26 |
% of votes with a positive feedback rating | 83% of 180 |
Total "Very Satisfied" Votes | 136 |
Total "Somewhat Satisfied" Votes | 28 |
Total "Not Satisfied" Votes | 16 |
Total Rank Assessments | 12 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 8 kyu |