My code is working fine for all test cases but when I memoize it using 3D vector , it gives 0 as output. please tell me what I have missed.
my code:- https://ide.codingblocks.com/s/262336
Wrong answer using memoization
@D19APPND0003
check ur updated code here-> https://ide.codingblocks.com/s/265022
a) on using vector it was giving mle so replaced it with array and declare it as global.
b) when if(k>0 ) then in that case we can simply make value at index i , j same and can call over i+1,j+1.
so made similar changes in that section
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.