i am getting different ans by memoization and dynamic programming memoization: for n=5 ans is 3 and for DP at n=5, ans is 4
code link
Minimum steps to bottomup
Hi @sandeep021
at line 34 and 35
instead of
if (n%3==0)q1=dp[i/3];
if (n%2==0) q2=dp[i/2];
it should be
if (i%3==0) q1=dp[i/3];
if (i%2==0) q2=dp[i/2];
In case of any doubt feel free to ask 
If you got your answer mark your doubt as resolved