# Leetcode 201 - Bitwise AND of Numbers Range

`Note:`

- Can’t do AND one by one, it will cause TLE.
- Find the
`biggest`

2’s power of`right`

as`pow`

. - We can be sure that
`pow`

highest bit is the same as`right`

. - Number bigger than pow & pow === pow.
- Number samller than pow & pow ===
`0`

. Except when`left == 1, right === 1`

.

`Question:`

Given two integers `left`

and `right`

that represent the range `[left, right]`

, return the bitwise AND of all numbers in this range, inclusive.

`Example:`

1 | Input: left = 5, right = 7 |

`Code:`

1 | /** |