Question 1
Medium A knapsack-style selection problem: there are item types, each with a quantity and a value, every item weighs 1, and the knapsack has a maximum weight W. Find the maximum total value that can be obtained.
Experience
The discussion favored a greedy approach over DP or DFS with a cache. The greedy approach is O(n log n), DP is O(n x W), and the optimal approach is quickselect at O(n).