Return the number of bits you must flip to turn a into b, that is, the number of positions where a and b differ in binary. For a = 10 (1010) and b = 7 (0111) the answer is 3.
Example 1
Input:
bit_flips_to_convert(10, 7)
Output:
3
Example 2
Input:
bit_flips_to_convert(5, 5)
Output:
0
0 <= a, b < 2**31No results yet
Run your code to check it against the examples, or submit to run every test.