if someone has any tutorial related to iterative approach for 0/1 knapsack problem , then plzz mention it… thank you .

What difference does it make whether it is iterative or recursive? The effective complexity for 0/1 knapsack will be O(N*W). \

The Bottom Approach can be used by just using the memoization and storing the lower value first,thus calculating the final result using the precomputed smaller value.

Iterative approach used in 0/1 Knapsack problem is solved using Dynamic Programming. This

should help you. It contains both the recursive and iterative algorithms with its implementation.

1 Like