Bradley M. Kuhn
|
2dca069d81
|
Perl solution to the Subset Sum problem.
This uses the well-known Dynamic Programming solution. I found two
different incarnations of it around, one for nonnegative set, and one for
integers.
Reference for the nonnegative one:
http://stackoverflow.com/questions/4355955/subset-sum-algorithm
Reference for integers one:
http://en.wikipedia.org/wiki/Subset_sum_problem
|
2013-01-08 13:38:23 -05:00 |
|