Subset sum problem: Difference between revisions

Content deleted Content added
m →‎version 2: changed the wording slightly. -- ~~~~
m →‎version 2: reduced a muddled over-reduntant wording. -- ~~~~
Line 751: Line 751:
<br>program more bulkier, so the list was just sorted externally.
<br>program more bulkier, so the list was just sorted externally.
<br>It's faster than version 1 (above) because it takes advantage of short-circuiting the
<br>It's faster than version 1 (above) because it takes advantage of short-circuiting the
<br>summing process and because of the short-circuiting, this version isn't a brute-force method.
<br>summing process, this version isn't a brute-force method.
<lang rexx>/*REXX pgm finds some non-null subsets of a weighted list whose sum=0. */
<lang rexx>/*REXX pgm finds some non-null subsets of a weighted list whose sum=0. */
arg target stopAt . /*get arguments from command line*/
arg target stopAt . /*get arguments from command line*/