This problem looks simple at first, but it actually teaches you one of the most important dynamic programming patterns:subset sum = 0/1 knapsack. Here is my complete debug journey: from wrong brute force → wrong greedy → correct DP. 1. First Attempt...
Markdown supported · ⌘↵ to post
No responses yet.