I was trying to think of a way to short circuit the loops once the sum of a group of numbers exceeds the target value...
And if the numbers are sorted numerically, there is no reason to start a loop for any numbers greater than half of the target value. But of course, if there is a solution, it would be found by that time.
But I haven't studied Jay's algorithm, so I don't know how this could be implemented...
Any thoughts, Jay?
>Hi Steve, no negative numbers. Actually the first thing I do is delete all records less than or equal to 0 and all numbers greater than the Target to help narrow the field. -Marvin
>
Steve Gibson