Getting TLE in two testcases
0-1 Knapsack Problem
@aiman.mumtaz
you have to memoize your solution.
i.e saving the ans of each state, so as to avoid calculating them again.
Getting TLE in two testcases
@aiman.mumtaz
you have to memoize your solution.
i.e saving the ans of each state, so as to avoid calculating them again.