How to find the length of LIS using two numbers.
For example,
[(1,2) (7,8) (3,4) (5,6)]
In the above array sequence, the length of LIS would be 3. i.e,
[(1,2) (3,4) (5,6)]
Any idea?
How to find the length of LIS using two numbers. For example, [(1,2) (7,8)
Share
You could use any algorithm for the standard LIS problem, with two modifications:
A < B) needs to compare the second number of A to the first number of B.