提交 027f9a5f 编写于 作者: GreyZeng's avatar GreyZeng

leetcode 201

上级 e5dc11a6
package resolved.bit;
// https://leetcode.com/problems/bitwise-and-of-numbers-range/
public class LeetCode_0201_BitwiseANDOfNumbersRange {
public int rangeBitwiseAnd(int left, int right) {
while (right > left) {
right -= (right & (-right));
}
return right;
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册