6 kyu
Consecutive Count
803 of 1,497Capocaccia
Description:
I want to know the size of the longest consecutive elements of X in Y. You will receive two arguments: items
and key
. Return the length of the longest segment of consecutive keys
in the given items
.
Notes:
- The items and the key will be either an integer or a string (consisting of letters only)
- If the key does not appear in the items, return
0
Examples
90000, 0 --> 4
"abcdaaadse", "a" --> 3
"abcdaaadse", "z" --> 0
Fundamentals
Similar Kata:
Stats:
Created | Sep 21, 2017 |
Published | Sep 21, 2017 |
Warriors Trained | 2469 |
Total Skips | 23 |
Total Code Submissions | 6745 |
Total Times Completed | 1497 |
JavaScript Completions | 803 |
Python Completions | 692 |
Ruby Completions | 47 |
Total Stars | 29 |
% of votes with a positive feedback rating | 94% of 301 |
Total "Very Satisfied" Votes | 266 |
Total "Somewhat Satisfied" Votes | 31 |
Total "Not Satisfied" Votes | 4 |
Total Rank Assessments | 14 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 7 kyu |