Subj : Re: question about finding sum of subset of contiguos elements of an array . To : comp.programming From : Willem Date : Thu Oct 06 2005 07:21 pm maadhuu wrote: ) hello , ) Given an array of positive and negative numbers, how do you come with an ) algorithm to find the subset of elements that have the highest sum . ) ) I can think of implementing an O(n^2) algorithm, but how do you do it in ) time less than that ?? Just select all the positive numbers. That should be the subset with the highest sum. Or isn't that what you meant with subset ? SaSW, Willem -- Disclaimer: I am in no way responsible for any of the statements made in the above text. For all I know I might be drugged or something.. No I'm not paranoid. You all think I'm paranoid, don't you ! #EOT .