Since in our case starting point is fixed "ie top left corner" so dynamic
programmng will not make any difference. Dynamic programing makes difference
only when starting point is not fixed. Solution from Greedy and Dynamic
programming will be same in this case. Correct me if I am wrong

On Sat, Oct 2, 2010 at 8:27 AM, Mridul Malpani <[email protected]>wrote:

> @ anand: the code u have given is an greedy approach. & it will not
> work.
>
> On Oct 1, 12:34 am, Anand <[email protected]> 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 <
> >
> > [email protected]> 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 [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<algogeeks%[email protected]>
> <algogeeks%[email protected]<algogeeks%[email protected]>
> >
> > > .
> > > 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected]<algogeeks%[email protected]>
> .
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to