There is a mistake in Bottom-up approach inside for loop ,
as we are iterating from i=2 to n we should have the conditions as if( i % 3==0) and if( i % 2==0), instead of if( n % 3==0) and if( n % 2==0).
Mistake in bottom-up approach of MIN steps to one
@touqeer11 Yes you are right, its a silly mistake, it should be i Instead of n
If this resolves your doubt mark it as resolved.