This C code for a dynamic programming solution to the 0/1 Knapsack Prob doesn't give the correct output with GCC. Why?
Why this DP solution to the 0/1 Knapsack Problem‍​​ doesn't give the correct output with GCC?