knapsack_dynamic: knapsack_dynamic

Description Usage Arguments Value

View source: R/knapsack_dynamic.R

Description

A faster algorithm to get the optimal solution to the knapsack problem through iteration.

Usage

1

Arguments

x

dataframe with columns w and v (weight and value) representing the items

W

double representing the weight limit of the knapsack

Value

list with the value of the items in the knapsack and the elements contained in the knapsack.


Marbr987/lab6 documentation built on Dec. 17, 2021, 2:20 a.m.