Challenge: Maximum Value of the Loot
Solve the Maximizing the Value of the Loot Problem.
We'll cover the following
Problem
Maximizing the Value of the Loot Problem
Find the maximal value of items that fit into the backpack.
Input: The capacity of a backpack , as well as the weights and costs of different compounds.
Output: The maximum total value of fractions of items that fit into the backpack of the given capacity, i.e., the maximum value of such that · and for all ( is the fraction of the -th item taken to the backpack).
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.