Draw a spreadsheet with items as rows and weight limits as columns.
Create a 2D table. Rows = items (0 to n), columns = weight limits (0 to capacity). All zeros initially.
> 5 rows × 6 columns (capacity=5) > items: w=[2,3,4,5] v=[3,4,5,6] > all cells = 0
Draw a spreadsheet with items as rows and weight limits as columns.
Create a 2D table. Rows = items (0 to n), columns = weight limits (0 to capacity). All zeros initially.
> 5 rows × 6 columns (capacity=5) > items: w=[2,3,4,5] v=[3,4,5,6] > all cells = 0
Sign in to cast your vote
Sign in to share your feedback and join the discussion.