Wine problem in dynamic programming

i am not able to understand ,what is exactly stored inside the 2d array used in memoization.what does arr[2][3] will mean? and why we take this definition to solve our problem?

i am not able to understand from the for loop line 26, see my code https://ide.geeksforgeeks.org/wTNLXiKUjV what end and endwindow means pls explain each line of it…comment it in my code will be helpful :slight_smile:

shubham a[2][3] this means that u r memoizing tge result that is u are savin the result and when if this like i=2 j=3 comes again than u have the result stored so u dont have to make a recursive call again to calculate ans for i=2 j =3 u can dorectly take it from array so this optimize ur code

i have commented the valid points check this
https://ide.codingblocks.com/s/70328

i dont mean this,i mean 2 and 3 means what ?,in general i and j denotes something.like in case of coin change problem it was no of coins and denominations

in coin change like u have to make 10 ans u have denomination like 2,3,5
then if u make like 10-2 =8 then u have to check how many ways are there to make 8 so i=2 j=8 contain if u minus 2 then how many ways are there to make 10

Hey Shubham,
As you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.