Driver Code
let A = 53 , B = 16 ; let mx = Math . max ( A , B ) ; let dp = new Array ( mx + 1 ) . fill ( 0 ) . map ( ( ) => new Array ( mx + 1 ) . fill ( - 1 ) ) ; document . write ( getMinOperations ( A , B , - 1 , - 1 , dp ) ) ;