Re: Minimum sub-sequence sum
- From: "Mark T.B. Carroll" <Mark.Carroll@xxxxxxxxxx>
- Date: Tue, 22 Jul 2008 10:49:59 -0400
Michael Jarrod <Michael.Jarrod@xxxxxxxxx> writes:
I have a sequence of integers (positive/negative values) and I would
like to find the sub sequence of consecutive values that yields the
smallest sum, I can think of a very simple O(n^3) complex solution,
however I was wondering are there any better solutions? and what is
the name of this kind of problem?
Your O(n^3) gets another n from each of:
1. Try different positions for the start of the subsequence
2. Try different positions for the end of the subsequence
3. Calculating the sum of a subsequence
to make the O(n^3)?
Mark
.
- References:
- Minimum sub-sequence sum
- From: Michael Jarrod
- Minimum sub-sequence sum
- Prev by Date: Re: Minimum sub-sequence sum
- Next by Date: Re: looking for old jounal "Journal of computing systems"
- Previous by thread: Re: Minimum sub-sequence sum
- Next by thread: Re: Minimum sub-sequence sum
- Index(es):
Relevant Pages
|