Re: [algogeeks] Max sum circular array

2012-07-24 Thread hary rathor
we can be use logical window  and slide through the array
in circular manner. apply kandane's algo on logical window.

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



Re: [algogeeks] Max sum circular array

2012-07-10 Thread adarsh kumar
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.comwrote:

 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.



[algogeeks] Max sum circular array

2012-07-09 Thread deepikaanand
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.