Subset sum problem: Difference between revisions
Content deleted Content added
m →version 2: reduced a muddled over-reduntant wording. -- ~~~~ |
m →version 1: change a word to make the OUTPUT section clearer. -- ~~~~ |
||
Line 612:
return 0</lang>
'''output''' when using the input of: <tt> 0 100 </tt>
<br>(The above arguments set the target sum to zero and limits finding
<br>This output was produced with a version of the REXX program that included the weights with the name.
<br>The REXX statement used was: /*weights in this one───> */ names=names @._ '{'#._"}"
Line 746:
Stopped after finding 100 subsets.
</pre>
===version 2===
This version requires the data to be in ascending order (by weight).
|