Simple Consecutive Sequence Count (retired)
Description:
Ascending Sequence => given a sequence of consecutive numbers in ascending order, for example: 3,4,5 where the difference is 1, however if given 2,7,9, which is not considered a ascending sequence (because the numbers there are not consecutive, difference between each number is not equal to 1).
Write a function that receives an array numbers (all numbers will be integers, can also include negative numbers) and returns the longest "ascending sequential sequence" from positive numbers.
For example if given the numbers below:
2,6,33,2,3,4,5,2,7,8,9,10,11,21,20
Your function will return 5.
7->8->9->10->11
which is 5 consecutive positive numbers
if there are consecutive numbers which are negative then they are not counted
Goodluck:P
Similar Kata:
Stats:
Created | Feb 23, 2021 |
Warriors Trained | 13 |
Total Skips | 0 |
Total Code Submissions | 28 |
Total Times Completed | 6 |
Java Completions | 2 |
Python Completions | 6 |
JavaScript Completions | 2 |
Total Stars | 0 |
% of votes with a positive feedback rating | 13% of 4 |
Total "Very Satisfied" Votes | 0 |
Total "Somewhat Satisfied" Votes | 1 |
Total "Not Satisfied" Votes | 3 |
Total Rank Assessments | 4 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |