Question DSA-DP-0006
EasyWhich of these problems is typically solved with dynamic programming?
- A.
Reversing a string
- B.
0/1 knapsack
- C.
Show answer and explanation
Answer: B
Each item is taken or not; DP over (item, capacity) avoids trying all 2ⁿ subsets.