in reply to Spliting array into nested sequential arrays
Well, just looking at it I think your first given output is wrong. Shouldn't it be this:
Output: [[1,2,3,4,5,6,7,8],[3,5,6],[3,8],[1,7,8]]It appears that the goal is to start a new array each time the next value is lower than the previous one.
That said, it would help if you would give the desired goal as described to you since I am only guessing at it for now.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Spliting array into nested sequential arrays
by Hameed (Acolyte) on Oct 29, 2014 at 01:15 UTC | |
by boftx (Deacon) on Oct 29, 2014 at 01:21 UTC | |
by Hameed (Acolyte) on Oct 29, 2014 at 01:34 UTC | |
by boftx (Deacon) on Oct 29, 2014 at 02:17 UTC | |
by Hameed (Acolyte) on Oct 29, 2014 at 03:38 UTC |