Problem: [problem:1272D]↵
↵
My Solution:[submission:108781615]↵
↵
Hello all,↵
↵
My idea:↵
if two elements are in strictly increasing order(i.e a[I]< < a[I+1]) ) dp[I+1] = dp[I] + 1↵
↵
↵
↵
else check if a[I-1] < a[I+1] then dp[I+1] = dp[I-1] + 1↵
↵
I am not sure where this is going wrong. Any help is appreciated. Thanks for your time.
↵
My Solution:[submission:108781615]↵
↵
Hello all,↵
↵
My idea:↵
if two elements are in strictly increasing order(i.e a[I]
↵
↵
↵
else check if a[I-1] < a[I+1] then dp[I+1] = dp[I-1] + 1↵
↵
I am not sure where this is going wrong. Any help is appreciated. Thanks for your time.