nbnt001's blog

By nbnt001, history, 4 years ago, In English

Given an unsorted array on integers, find the length of its largest sub-sequence such that it is increasing at first and then decreasing and the number of elements in increasing and decreasing parts should be the same.

Input: 1 2 3 2 1 4 5 6 7 19 15 12 10 9 Output: 9

Full text and comments »

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