LeetCode(201) Bitwise AND of Numbers Range
2015-08-12 11:10
232 查看
参考program creek
[code]class Solution { public: int rangeBitwiseAnd(int m, int n) { while(n > m) n = n & n - 1; return n & m; } };
相关文章推荐
- iOS开发所有KeyboardType与图片对应展示
- ]Erlang进程堆垃圾回收机制
- 在项目中使用ExtJS
- iOS开发所有KeyboardType与图片对应展示
- 手机尺寸和平板电脑的屏幕分辨率
- 面试:归并排序和分治法
- jQuery的三种$()
- MySQL备份与恢复之热拷贝(4)
- 队列
- 单反相机滤镜种类和作用
- 集成CCFlow工作流与GPM的办公系统驰骋CCOA介绍(一)
- Num 33 : 函数递归 [ 全排列 ]
- 企业级搜索引擎Solr 第三章 索引数据(Indexing Data)[2]
- 第七篇:C/C++动态内存的分配问题
- 备份
- iOS UICollectionView实现瀑布流(3)
- RedHat Linux RHEL6配置本地YUM源
- [LeetCode]#14 Longest Common Prefix
- 静态代理的代理模式
- less语法(二)混合属性