this wont work on all the problem for example pi={10,12,28} and wi={1,2,4} then your approach for solving 0/1 knapsack won't work. The question is how to solved 0/1 without drawing whole table on paper as it can be seen from given problem table size would be of 200 cells