In one operation, choose any binary digit of start and flip it from 0 to 1 or from 1 to 0. Leading zero bits may also be flipped. Return the fewest operations needed to turn start into goal.
Example 1:
Input: start = 8
goal = 9
Output: 1Explanation: The binary values 1000 and 1001 differ only in the rightmost bit, so one flip is enough.
Example 2:
Input: start = 0
goal = 15
Output: 4Explanation: To change 0000 into 1111, each of the four displayed bits must be flipped once.
Example 3:
Input: start = 25
goal = 25
Output: 0Explanation: The starting number already equals the goal, so no bits need to change.
Constraints:
0 <= start, goal <= 1000000000