Since we are doing bitwise then let's think as it is. AND all numbers from m to n inclusive then all the right different bits will be erased until all bits are identical in the left part; why? the consecutive attribute of the problem -> from m to n inclusive means gradual increments from m to n <font color="#ff0000">each step with another 1 addition causing more bits zero</font>

Bang! End of Story!

- space cost O(1).
- time cost O(1) - > the digits' number is limited under 32 considering the range.

```
int rangeBitwiseAnd(int m, int n)
{
int count = 0;
while(m != n)
{
m >>= 1;
n >>= 1;
count++;
}
return m << count;
}
```