Description Usage Arguments Value Source
View source: R/knapsack_greedy.R
The greedy approach to solving the knapsack problem
1 | knapsack_greedy(cx, W)
|
cx |
A data.frame containing items with weights and values |
W |
The weight limit of the knapsack. |
The total value of the fitted items, fitted items, and the time to run the algorithm.
https://en.wikipedia.org/wiki/Knapsack_problem
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.