I was assuming that the original poster wanted an algorithm for a continuous range subsequence which I should have called a substring :). Thanks KS.
How big is the sum of the positive elements of the sequence? Subset-sum is NP-complete, and the standard DP solution doesn't fit in the original poster's O(N) space requirement. --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups-beta.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---