iamskp's blog

By iamskp, history, 4 years ago, In English

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].

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?