Bit Manipulation - Bitwise AND of Numbers Range
Given the function below, what is the output of
rangeBitwiseAnd(10, 15)?
def rangeBitwiseAnd(left: int, right: int) -> int:
shift = 0
while left != right:
left >>= 1
right >>= 1
shift += 1
return left << shift