Description
Given two integers left and right that represent the range [left, right], return the bitwise AND of all numbers in this range, inclusive.
Examples
Input:
left = 5, right = 7Output:
4Explanation:
5 & 6 & 7 = 4.
Input:
left = 0, right = 0Output:
0Explanation:
Single element range.
Input:
left = 1, right = 2147483647Output:
0Explanation:
Large range results in 0.
Constraints
- •
0 ≤ left ≤ right ≤ 2³¹ - 1