See: Subset Sum Problem
This is most likely only relevant if your set is very large. There is an algorithm to solve it in polynomial time that trades off non-polynomial high memory usage for fast processing time.
See: Polynomial Time Dynamic Programming Solution
-Andrew.
In reply to Re: finding values in an array that add up to a specific number
by tomazos
in thread finding values in an array that add up to a specific number
by Forsaken
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |