You are provided a number X and another number Y.
You can apply only the following operations : -
a) If the number is even, either double the number or increase it by 1.
b) If the number is odd, either double the number or decrease it by 1.
What should be the minimum number of steps to convert X to Y?
For example - If $X = 4$, and $Y = 11$ , the answer is $3$.
$4\to 5\to 10\to 11$.
There can be cases where answer is not reachable at all like $X=4, Y=6$.