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