Capacity:5
38
1x
Dynamic Programming

0/1 Knapsack (Bottom-Up DP)

Step 1 of 6

Tabulation (Bottom-Up DP) solves all sub-problems iteratively from smallest to largest, filling a 2D table. No recursion needed — just a nested loop that builds the answer from scratch.

The Problem

Given N items with weights and values, and a knapsack of capacity W, pick items to maximize total value without exceeding W. Each item can only be picked once (0/1).