@ anand: the code u have given is an greedy approach. & it will not work.
On Oct 1, 12:34 am, Anand <anandut2...@gmail.com> wrote: > Here is a code for solving the problem using DP.http://codepad.org/AoPtCmwA > > On Thu, Sep 30, 2010 at 3:01 AM, Modeling Expert < > > cs.modelingexp...@gmail.com> wrote: > > recurssion... > > > At any point X > > > val_t getMax( position X){ > > > ( ! End of Table ) > > sum = GetApples[X] + MAX ( getMax(X_down) , getMax > > ( X_right) ) ; > > > returnn sum ; > > } > > > -- > > 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<algogeeks%2bunsubscr...@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/algogeeks?hl=en. -- 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.