项目作者: jayswamicodes

项目描述 :
Implementation of knapsack dynamic programming
高级语言: C++
项目地址: git://github.com/jayswamicodes/knapsack_dynamic_prog_1.git
创建时间: 2019-02-04T01:52:53Z
项目社区:https://github.com/jayswamicodes/knapsack_dynamic_prog_1

开源协议:

下载


knapsack_dynamic_prog_1

Problem Description

There are three bags labelled as 1, 2 & 3. The contents of bag are as following:

  • Bag 1: Value 5, Weight 3
  • Bag 2: Value 3, Weight 2
  • Bag 3: Value 4, Weight 1

If a thief enters the house to steal and the maximum weight of bag he can carry is 8 kg (variable), how many items from above could he steal to maximize the worth

This problem is solved using Dynamic programming or Memorization