Detecting sequence of numbers
#1

Hello, I need some help with the detection of sequences of numbers.

In my script I have 7 numbers. Now, I need to find a way to make the script understand if there are atleast 5 of those 7 numbers that are in sequence.

For example, if the numbers are:

5 9 7 5 3 6 5, no sequence found.
4 9 3 6 2 5 11, found a sequence of atleast 5 numbers with maximum value of 6.

Thank you.

ps: if it can be useful, the numbers will range only from 2 to 14.
Reply


Messages In This Thread
Detecting sequence of numbers - by Skiaffo - 11.03.2012, 13:55
Re: Detecting sequence of numbers - by eesh - 11.03.2012, 14:08
Re: Detecting sequence of numbers - by Skiaffo - 11.03.2012, 19:18
Re: Detecting sequence of numbers - by RyDeR` - 11.03.2012, 20:26

Forum Jump:


Users browsing this thread: 2 Guest(s)