Professional Documents
Culture Documents
Akhilesh DAA 2.3
Akhilesh DAA 2.3
Akhilesh DAA 2.3
Aim:
Develop a program and analyze complexity to implement 0-1 Knapsack using Dynamic
Programming.
Objective:
Input/Apparatus Used:
Procedure/Algorithm:
Sample Code:
#include <bits/stdc++.h>
using namespace std;
struct Item {
int weight;
int profit;
};
int knapsack01(Item items[], int n, int capacity)
{
Observations/Outcome:
Learning Outcomes:
I learned about dynamic programming.
I learned about the 0-1 Knapsack problem and its solution using dynamic programming.
I learned about the time and space complexity of 0-1 Knapsack.
I learned about its implementation and uses in dynamic programming.