Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.

Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).

int rangeBitwiseAnd(int m, int n) { if(m == n) return m; int a =(int)(log(m) / log(2)); int b = (int)(log(n) / log(2)); if (a < b) { return 0; } else { return pow(2,a) + rangeBitwiseAnd(m-pow(2,a), n - pow(2,a)); }

}

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.