Leetcode-Question-201: Bitwise AND of Numbers Range

原文链接:
https://leetcode.com/problems/bitwise-and-of-numbers-range/

题目描述:
201. Bitwise AND of Numbers Range
Difficulty: Medium

Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive.

For example, given the range [5, 7], you should return 4.

解答:

 

发表评论

电子邮件地址不会被公开。 必填项已用*标注