Time complexity(o\1 knapsack)

i want a clear explanation of why is exponential time complexity of knapsack 0/1 ?

hello @dare_devil_007

this is the recursion tree formed in 0/1 knapsack

Tine complexity is O(2^n) can be confirmed from the above recursion tree (just calculate the summation).

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.