take a test case:
1 2 3 4 5 6 3 2 6 9 10 12 6 5 4 3 2 1

the subarrays then are:
(1 2 3 4 5 6 3 2 ) (6 9 10 12 6 5 4 3 2 1)
 1 2 3 4 5 6 5 4    4 5  6   7  6 5 4 3 2 1  -->candies allotment on
solving subarrays..
                    --------
                here both are given same candies which is wrong !
I mean that the subarrays solution are not independent!


On Mon, Jul 9, 2012 at 3:58 PM, Anshu Mishra <[email protected]>wrote:

> @sanjay it's not like that
>
> e.g : (3 5 6 7 8 4) 7
>         1 2 3 4 5 1  2
> Yes we have to increase just by one, but while decreasing choose the
> lowest possible such that each trivial component, if it is in decreasing
> phase, should end with 1.
>
> On Mon, Jul 9, 2012 at 12:53 PM, sanjay pandey 
> <[email protected]>wrote:
>
>> does ur sol seems lyk incerasing 1 if next number is greater that prev n
>> decreasing 1 if less..???
>>
>>  --
>> 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.
>>
>
>
>
> --
> Anshuman Mishra | Software Development Engineer | Amazon
>
>  --
> 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.
>



-- 
regards,
Bhaskar Kushwaha
Student
Final year
CSE
M.N.N.I.T.  Allahabad

-- 
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