Need help solving this question. I know DP would be used but still, no idea. Thanx

Revision en1, by nbnt001, 2020-09-15 09:43:22

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

Tags #dp, #questions

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English nbnt001 2020-09-15 09:43:22 353 Initial revision (published)