This is similar to maximum sum contiguous subarray problem. Consider the
circular array as a normal array, except that once you reach the end of the
array, if the sum found upto that element(using Kandane's algo, refer Wiki)
is negative, then try including elements from the beginning of the
array(circular fashion), until you find a sum that is greater. Keeping
track of the sum is obvious necessity. Finally return the sum.



On Tue, Jul 10, 2012 at 10:58 AM, deepikaanand <swinyanand...@gmail.com>wrote:

> What is best approach to find max sum in a circular array...
>
> --
> 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.
>
>

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

Reply via email to