Google interview question

knapsack problem leetcode medium needed sometime