fixed 201 -1 can not shift bug

This commit is contained in:
luzhzh 2019-05-29 11:10:22 +08:00
parent dc285aa7a1
commit 8508517153

View File

@ -48,7 +48,7 @@
class Solution {
public:
int rangeBitwiseAnd(int m, int n) {
int d = INT_MAX;
unsigned int d = INT_MAX;
while ((m & d) != (n & d)) {
d <<= 1;
}