Lab6R: Lab6R: This is the package for R lab 6 This package contain 3...

Description brute_force_knapsack function dynamic_knapsack function greedy_knapsack fucntion

Description

Lab6R: This is the package for R lab 6 This package contain 3 function:

brute_force_knapsack function

Use brute force approach to solve the knapsack problem. The result is a list that contain the maximum value and the list of elements chosen

dynamic_knapsack function

The same with the previous function, but use dynamic approach to solve the problem

greedy_knapsack fucntion

The same with the first function, but use greedy approach to solve the problem


DucDuong92/Lab6R documentation built on May 22, 2019, 2:03 p.m.