sir why is this code failing 3 cases??
Sir doubt in knapsack
sir but why will it make difference its an extra part in dp which we wont even consider than why does that work?
ur dp is of size
dp[size][bag_capacity] right?
but u r intilaising only upto dp[size][size], some part will remain uninitialise (may contain garbage value) due to which u will get wa