do both s[i-2] and s[i-1] need to be checked? isn't by construction
s[i-1]>=s[i-2] ? what about s[i] = max( s[i-2]+a[i], s[i-1], a[i]) ?
On Wed, Jul 20, 2011 at 3:48 AM, Piyush Sinha wrote:
> ya nitish above condition will do
>
> On 7/20/11, Nitish Garg wrote:
> > I think:
> > s[i] = max(s[i
how to solve part 2?
On Tue, Jul 19, 2011 at 4:16 PM, hary rathor wrote:
> n ; ~n
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, sen