May-27-2019, 03:58 PM
thanks i tried this approach but i realise that my data is much more complicated than initially observed.
I have situations whereby the sub arrays would look like below:
[[0,1,2,3,4,5,6,7,8,9,10],[0,1,2,3,4,5,6,6,7,7,8,8,9,10][0,1,2,3,4,5,6,7,8,9][0,1,2,3,4,5,6,7,1,8,9,10]
So there are situations where the number repeats itself or the ending number could be either 9 or 10 which makes the earlier code to split the array not work if the ending number is 9. and what i am trying to extract from each of this sequence is when there is an obvious break in it like going from 7 to 1 in the last subarray example. I am not sure how best to deal with this now given the complexity of these sub arrays.
I have situations whereby the sub arrays would look like below:
[[0,1,2,3,4,5,6,7,8,9,10],[0,1,2,3,4,5,6,6,7,7,8,8,9,10][0,1,2,3,4,5,6,7,8,9][0,1,2,3,4,5,6,7,1,8,9,10]
So there are situations where the number repeats itself or the ending number could be either 9 or 10 which makes the earlier code to split the array not work if the ending number is 9. and what i am trying to extract from each of this sequence is when there is an obvious break in it like going from 7 to 1 in the last subarray example. I am not sure how best to deal with this now given the complexity of these sub arrays.