Bitwise AND of Numbers Range
Problem statement
Given two nonnegative integers left and right with left <= right, return the bitwise AND of every integer in the inclusive range [left, right].
Function
rangeBitwiseAnd(left: int, right: int) → intExamples
Example 1
left = 5right = 7return = 45 AND 6 AND 7 equals 4.
Example 2
left = 0right = 0return = 0The range contains only zero.
Constraints
0 <= left <= right <= 2^31 - 1.