Wine problem dp

Sir,i couldn’t understand why we used 2-D DP array and how this 2-D array work to store the variable.

@prince43055kumar
dp[i][j] would denote the maximum answer you can get if you have i…j bottles.