Here is a problem:
Suppose we have following arrays:
[1,2,9]
[3,6,7]
[4,11]
[8,10,12]
Items in array are unique and ordered. The task is to find the shortest sequence length which will contain at least one element of every array, but these elements should go one by one (without gaps, can't be [1,3]) and also ordered. So in this case the answer is:
5 => [7,8,9,10,11]
Is there efficient way to do this?