Description Usage Arguments Value
View source: R/knapsack_dynamic.R
A faster algorithm to get the optimal solution to the knapsack problem through iteration.
1 | knapsack_dynamic(x, W)
|
x |
dataframe with columns w and v (weight and value) representing the items |
W |
double representing the weight limit of the knapsack |
list with the value of the items in the knapsack and the elements contained in the knapsack.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.