Anonymous user
Subset sum problem: Difference between revisions
→version 2: remove the implication that this is not a brute-force method
(→version 2: optimized the previous version, it's faster by a facter of four or so. -- ~~~~) |
(→version 2: remove the implication that this is not a brute-force method) |
||
Line 816:
program more bulkier, so the list was just sorted externally.
<br>It's quite a bit faster because it takes advantage of short-circuiting the summing process,
<br>and is an order of magnitude faster than
<lang rexx>/*REXX pgm finds some non-null subsets of a weighted list whose sum = 0.*/
arg target stopAt . /*get arguments from command line*/
|