Retired

Simple Consecutive Sequence Count (retired)

2 of 61ROCKY1

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

Fundamentals

More By Author:

Check out these other kata created by 1ROCKY1

Stats:

CreatedFeb 23, 2021
Warriors Trained13
Total Skips0
Total Code Submissions28
Total Times Completed6
Java Completions2
Python Completions6
JavaScript Completions2
Total Stars0
% of votes with a positive feedback rating13% of 4
Total "Very Satisfied" Votes0
Total "Somewhat Satisfied" Votes1
Total "Not Satisfied" Votes3
Total Rank Assessments4
Average Assessed Rank
7 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • 1ROCKY1 Avatar
Ad