Hi,
I've a random list of distinct integers as:
1 8 90 1 8 10 11 12 9 5 4 2
I want to find a series of ordered numbers (ascending or descending) with each series having length >3.
E.g.
1 < 8 < 90 has a strict order but this will not be returned since its length is <=3
But 1 < 8 < 10 < 11 < 12 will be returned since it has a strict order and has length = 5.
Similarly 9 > 5 > 4 > 2 will also be returned.
Could anyone please suggest an ways to implement this?
Thanks,
Angkar