[ [1,2,3], [1,2], [1], [4], [4,5,6] [4,6], [8] ]
I have a array of arrays like this. I would like to find optimal connected values. fo