Given three integers a, b, and c, return the minimum number of bit flips required so that (a OR b) equals c. Pattern focus: Set/Clear kth Bit. Compare each bit position independently and flip only the positions that are wrong.
a, b, c = integers
minimum number of bit flips required
Example 1:
Input:
a = 2 b = 6 c = 5
Output:
3
Explanation:
Two bits in a/b need adjustment to match c.
Example 2:
Input:
a = 4 b = 2 c = 7
Output:
1
Explanation:
Only one zero bit must be flipped to 1.