Given an array, find out the longest increasing subsequence which is lexicographically smallest.
For example:
Given array : [9,2,10,3,11,4]
Possible LIS: [2,10,11],[2,3,4],[9,10,11],[2,3,11]
Lexicographically smallest LIS [2,3,4].
Need help in a dp problem!
Given an array, find out the longest increasing subsequence which is lexicographically smallest.
For example:
Given array : [9,2,10,3,11,4]
Possible LIS: [2,10,11],[2,3,4],[9,10,11],[2,3,11]
Lexicographically smallest LIS [2,3,4].