title: minimum number of operations to make two numbers equal
body: <p>I had an interview and couldn't think a clear/best solution for this problem. </p>
  
  <p>Given 2 numbers A and B and we need to convert a number A to B with minimum number of the following operations:</p>
  
  <ul>
  <li>Subtract 1</li>
  <li>Add 1</li>
  <li>Multiply 2</li>
  <li>Divide 2</li>
  <li>Multiply  3</li>
  <li>Divide 3</li>
  </ul>
  
  <p>For e.g. : if a=3 and b=7, the program should output 2.</p>
  
  <p>1st operation : *2 -> 3*2 = 6.</p>
  
  <p>2nd operation : +1 -> 6 + 1 =7.</p>
  
  <p>For e.g. : if a=10 and b=60, the program should output 2.</p>
  
  <p>1st operation: *2 -> 10*2 = 20.</p>
  
  <p>2nd operation: *3 -> 20*3 = 60</p>
  
  <p>As we can Change m (10) to n (60) after 2 operations, the answer is 2.</p>
  
  <p>Tried to use dynamic programming and recursion approach but to no avail. Any tips?</p>