Given two integers left and right, return the bitwise AND of all numbers in the inclusive range [left, right]. Pattern focus: Clear Lowest Bit. The answer keeps only the shared prefix bits that survive after repeatedly clearing differing low bits.
left = lower bound, right = upper bound
bitwise AND of all integers in [left, right]
Example 1:
Input:
left = 5 right = 7
Output:
4
Explanation:
5 & 6 & 7 = 4.
Example 2:
Input:
left = 0 right = 0
Output:
0
Explanation:
A single value range returns the value itself.