0
The largest sequential subsystem
the sub sequential in array
1 Respuesta
0
You mean the largest sequential subsequence?
In which case, go through the array, keep track of the last digit you saw, keep track of the longest sequence you've seen, and the length of the current sequence. At the end, you can print out the longest sequence.
Alternatively if you need to print out the longest sequence, we can keep track of the start and stop indices of the longest sequence and the current sequence.