Compress a list into (value, count) runs — then read values and find positions straight from the compressed form.
Compress a list into (value, count) runs — then read values and find positions straight from the compressed form.
The discussion opens with the full question.