Subj : Re: question about finding sum of subset of contiguos elements of an array . To : comp.programming From : Willem Date : Tue Oct 11 2005 01:41 am August wrote: ) We simply calculate the partial sums (from the beginning) and return the ) maximum difference, all in one loop. Here is an O(n) time, O(1) space ) algorithm implemented in Oberon: And the big duh this week goes to me. My solution was to calculate the partial sums (fromthe beginning) and store those in an auxiliary arrayj and then to search the auxiliary array for the min and max value. I blame it on the youth of today. 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 .