Description Usage Arguments Value References
View source: R/dynamic_knapsack.R
Solution to the knapsack problem using Dynamic Programming.
The algorithm solves the knapsack problem exact by iterating over all possible values of weight.
1 | dynamic_knapsack(x, W)
|
x |
Dataframe with variables v and w. |
W |
Integer. Size of the knapsack. |
Returns a list with the total final value and the items added to the knapsack.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.