Can you explain how to proceed using top down and also bottom up
Approach for 0-1 Knapsack using DP
my suggest would be to first think of the recursive solution for this problem , then try to optimize it using memoization (that will be your top-down approach) and then you can try bottom-up approach (tabulation)
If you want hint for recursive solution then do ask me after trying by yourself
Got the issue …Now working fine
great !! In case of any doubt feel free to ask 