0-1 KNAPSACK problem


im getting segmentation fault

hello @Bhavya_Goel

your code is correct,just declare dp array outside the function it will work.(reason memory capacity of global scope is more than the function)