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

Правка en1, от 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

Теги #dp, #questions

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский nbnt001 2020-09-15 09:43:22 353 Initial revision (published)