See Code
There is a conclution:
When we do & (and) manipulation on a range(m, n) inclusively, we just find the common bits in m and n from left to right and pad zeros for the rest
O(n)
class Solution:
def rangeBitwiseAnd(self, m, n):
"""
:type m: int
:type n: int
:rtype: int
"""
i = 0
while m != n:
m >>= 1
n >>= 1
i += 1
return n << i