in reply to Re: Faster (but uglier) PWC 350-2 solutions
in thread Faster (but uglier) PWC 350-2 solutions
I think if in e.g. "Example 2" the $to was e.g. 8500, then your solution would find all 3 pairs again and report false positives. I.e. stronger accounting is required. I'm not sure I'm happy with my own accounting, on the 2nd thought.
If $count in "Example 3" was not "5" but "1", then how many items would be added to the result for "1428570"? 1 or 5? The "at least" in the wording of the challenge seems to imply that "1". Or such is my interpretation (PWC ambiguous as usual). But then it follows, that you can't break out early with "next I;". Because there will be false positives later if $to was higher (see?). I had a similar "next OUTER;" in initial drafts, but then decided against it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Faster (but uglier) PWC 350-2 solutions
by ysth (Canon) on Dec 09, 2025 at 23:42 UTC | |
by Anonymous Monk on Dec 10, 2025 at 10:11 UTC |