Description Usage Arguments Value References
View source: R/knapsack_dynamic.R
Returns the maximum value given the capacity of knapsack by using dynamic programming.
1 | knapsack_dynamic(x, W)
|
x |
A |
W |
the maximum capacity of the knapsack. |
A list containing the maximum value and the elements.
en.wikipedia.org/wiki/Knapsack_problem
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.