Amit,

Could you explain why {1, -2, 4, 5, -2} is not a solution, the sum is
6 and it's longer than {1, -2, -2, 6}. Thanks.

Jinsong

On Aug 17, 2:17 pm, amit <amitjaspal...@gmail.com> wrote:
> Given an array, find the longest subarray which the sum of the
> subarray less or equal then the given MaxSum
> int[] FindMaxSumArray(int[] array, int maxsum)
> for example, given array: {1, -2, 4, 5, -2, 6, 7}
> maxsum=7
> the result would be: {1,-2, -2, 6}

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@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