Wines Problem DP

Hello Sir/Ma’am, i was trying to implement this problem using bottom up DP approach, i tried to us the logic somewhat similar to matrix chain multiplication bottom up. but i am confused in updating dp[i][j] value condition (line 52 in my code). Please help me.
sharing code link: https://ide.codingblocks.com/s/193283

@priyanshi.agarwal3405,
No you don’t need Matrix Chain DP for wine problem. In wine problem, answer for current state(i,j) only depends on (i+1,j) and (i,j-1), and not on usual matrix chain state (i,k), state(k+1,j).

Okay sir, got it…