Re: Interesting Programming Problem
- From: Gene Wirchenko <genew@xxxxxxxx>
- Date: Thu, 29 May 2008 08:42:29 -0700
"Al Marino" <almarino_AT_intelliform.net> wrote:
for this particular case (searching for a specific total)
it is better to sort in ascending order, that way you stop
when sum > total
in your example, 10 checks vs 17 (depending how you count)
Read my posting more carefully. I do stop when the sum is too
big. It is just a matter of the order that the elements are
considered.
[snip]
Sincerely,
Gene Wirchenko
Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.
.
- Follow-Ups:
- Re: Interesting Programming Problem
- From: Al Marino
- Re: Interesting Programming Problem
- References:
- Interesting Programming Problem
- From: Jeff Grippe
- Re: Interesting Programming Problem
- From: Gene Wirchenko
- Re: Interesting Programming Problem
- From: Al Marino
- Interesting Programming Problem
- Prev by Date: Re: MSCAL.OCX v7 overwritten by v11 of control?
- Next by Date: Re: Remove duplicate records
- Previous by thread: Re: Interesting Programming Problem
- Next by thread: Re: Interesting Programming Problem
- Index(es):
Relevant Pages
|