Challenge: Maximum Amount of Gold
Solve the Maximum Amount of Gold Problem.
We'll cover the following
Problem
Maximum Amount of Gold Problem
Given a set of gold bars of various weights and a backpack that can hold at most pounds, place as much gold as possible into the backpack.
Input: A set of gold bars of integer weights and a backpack that can hold at most pounds.
Output: A subset of gold bars of maximum total weight not exceeding .
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.