Question: 3) Answer the following problems: a. A thief enters a store with a knapsack of 7Kg capacity. In the store, there are the following
3) Answer the following problems: a. A thief enters a store with a knapsack of 7Kg capacity. In the store, there are the following 5 items: Item Weight (kg) Value Rice 2 14 Wheat 1 11 Salt 3 20 Sugar 2 16 Oat 2 10 Calculate the maximum profit the thief can make by stealing the above items. b. Given two strings and Y = , calculate and determine the Longest common subsequence (LCS).
Step by Step Solution
3.46 Rating (159 Votes )
There are 3 Steps involved in it
A Code include using namespace std long long int p 1000000007 int n 5 w vector dp1001 vector1001 aut... View full answer
Get step-by-step solutions from verified subject matter experts
