The DP works fine on the example.

On Sep 4, 8:21 am, vikash jain <vikash.ro...@gmail.com> wrote:
> i think this prob cannot be solved by DP then...
> Because anytime a new value coming into the non decreasing sub-array
> obtained by the
> DP equation can be disrupted(like in the above example).
> I think a backtracking approach cud prove useful.
> (Recursion)
> anytime we get a new element we can do two things :
> Either delete it or decrement the previous values equal to it.
> We do both by calling the  same function twice for each element.
> Plz comment on this...

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to