for your example 5 4 3 2 1 5 4 3 2 1 -- candies assignement. (since the length of the longest decreasing sequence is 4, and length of increasing seq. before it is 0. its max(0+1,4)+1 = 5
--Sravan Reddy On Tue, Jul 10, 2012 at 8:09 AM, bala bharath <[email protected]> wrote: > > can u explain ur algorithm for the sequence > > * > 5 4 3 2 1* > > -- > 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. > -- 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.
