u can use count sort or bucket sort, hashing
Regards,
Adi Srikanth.
Mob No 9887233349
Personal Pages: adisrikanth.co.nr


On Mon, Aug 15, 2011 at 8:54 PM, sukran dhawan <[email protected]>wrote:

> use kadane 's algorithm
>
>
> On Mon, Aug 15, 2011 at 8:46 PM, Bharat Kul Ratan <[email protected]
> > wrote:
>
>> We've to count how many the times the maximum sum occurs in an array.
>> Value of maximum sum includes only contiguous elements and is defined as
>> addition of elements.
>> For example, if given array is:
>>
>> 0 1 1 2 ; maxsum is 4 and count is 2
>> 1 0 1 ; maxsum is 2 and count is 1
>> 1 0 -1 -1 1 0 ; maxsum is 1 and count is 4
>> 0 0 0 0 ; maxusm is 0 and count is 10
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/algogeeks/-/ZflOcnPTItAJ.
>> 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.
>

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