View source: R/CommonMZNProblems.R
Solve a simple knapsack problem (Goal is to maximize the profit)
1 | knapsack(n, capacity, profit, size)
|
n |
number of items |
capacity |
total capacity of carrying weight |
profit |
profit corresponding to each item |
size |
weight/size of each item |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.