DP Tabe for 0 1 Knapsack Problem not being printed properly

hello @anshufirefox

Same problem again. What was the logic behind the change that you did btw?

When I print dp matrix, I wanted to see the N+1 * S+1 dimension matrix. What is being printed instead is something else

check for:
N=3
S=50
wt: 10 20 30
val: 60 100 120

The abrupt printing is beause of diff in size of numbers (no. of characters). Got it

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.