Spit Array into two such that both part form Strictly Increasing Subsequence

Правка en2, от saifhaider0z, 2019-06-12 21:38:55

I wanna ask is there any why by which we can check that a given array can be split int two subsequence such that both are Strictly increasing. If not Possible Output is "NO" else "YES".

Better approach than O(2^n).

Теги increasing subsequence, #dp, #greedy

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский saifhaider0z 2019-06-12 21:38:55 30 Tiny change: '"YES".\n\n' -> '"YES".\n\n\nBetter approach than O(2^n).'
en1 Английский saifhaider0z 2019-06-12 21:08:52 266 Initial revision (published)