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