I have an array full of data, but the data intersect at 77 intervals (which have different lengths) like this
[-1, 2, 2, 4, -5, 77, 77, 77, 6, 5, 34, 77, 77, 4, 7...]
There is no problem to find the index of the beginning or end of this interval, but I need to save their indices with some kind of (?) Array (as I thought) is not suitable for this (but maybe there is a solution how to write this in the matrix, but the results have different sizes.so for input
[-1, 2, 2, 4, -5, 77, 77, 77, 6, 5, 34, 77, 77, 4, 7...]
expected response
[6,7,8]
[12,13]
starts with 1. How can I do this?