Concept Flow - Unbounded Knapsack Problem
Start with empty DP array
For each capacity from 0 to W
For each item
If item weight <= capacity
Update DP[capacity
Repeat for all capacities and items
DP[W
Return DP[W
We fill a DP array where each index represents capacity. For each capacity, we try all items and update the max value considering unlimited item usage.
