in reply to Finding the BEGINNING and ENDING positions of sequentially increasing sublists from a perl numeric array
What have you tried so far? Where are you having trouble?
We'll be happy to help with algorithm problems and perl troubles, but we're not a code writing service, so please show your own efforts here (post code!)
It's not so hard: loop over the array, and keep a variable around with the next value you expect. When that expectation isn't met, you know that a new subsequence starts.
|
|---|