Non overlapping Longest Increasing Subsequence (L1) And Decreasing Subsequence (L2)in array with max length (L1+L2)

Правка en1, от Sangar, 2017-04-11 20:31:42

Hello,

I have been trying this question on Spoj BatMan2

It requires to find a LIS from left to right and a LIS from right to left but non overlapping

Someone suggested this solution in comments

really aww sum problem cant wait to share the idea simply go one way and give each number to a increasing or decreasing or nothing max among three is ans

can anyone help with this DP problem

Теги dp, maths

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Sangar 2017-04-11 20:31:42 562 Initial revision (published)