Driver Code
public static void main ( String [ ] args ) { int A = 53 , B = 16 ; int mx = Math . max ( A , B ) ; int dp [ ] [ ] = new int [ mx + 1 ] [ mx + 1 ] ; for ( int i = 0 ; i <= mx ; i ++ ) { for ( int j = 0 ; j <= mx ; j ++ ) dp [ i ] [ j ] = - 1 ; } System . out . println ( getMinOperations ( A , B , - 1 , - 1 , dp ) ) ; } }