can you please send me the code snippet to get a better understanding. On Fri, Jul 29, 2011 at 9:51 AM, ankit sambyal <ankitsamb...@gmail.com>wrote:
> use the following recursive equation : > S{i]=max(S[i-2]+a[i],S[i-1]) > S[0]=a[0] > S[1]=max(a[0],a[1]) > > S[size-1]is the required answer > > -- > 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, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- AMAN AGARWAL "Success is not final, Failure is not fatal: It is the courage to continue that counts!" -- 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, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.