In this if a number is odd then only one operation is allowed multiplying by 2 and if number is even then we can divide the number until that number is odd. i stored all these numbers in a vector and created a hash map.

Then I traversed on vector and found minimum difference.

This solution passed in contest on hackerearth. But I have a test for which it fails.

**Test Case** : 2 5

for this answer should be 3 but my logic is giving 1 is it correct or not ?