Answer the question
In order to leave comments, you need to log in
How to convert a sorted array of elements into an array with sequence descriptions?
Converting a sorted array of elements to an array of objects of the form {key,with,before}
Example
function([a,a,a,a,b,b,b,b,c,c]){
...
} // [{key:a,with:0,before:3},{key:b,with:4,before:7},{key:c,with:8,before:9}]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question