标题:Reverse Bits通过率:27.6%难度:简单Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as0000001010010...
分类:
其他好文 时间:
2015-03-08 20:07:28
阅读次数:
120
Reverse bits of a given 32 bits unsigned integer.
归并法
class Solution {
public:
uint32_t reverseBits(uint32_t n) {
n=(n>>16)|(n<>8)|((n&0x00ff00ff)<<8);...
分类:
其他好文 时间:
2015-03-08 18:53:49
阅读次数:
137
1.题目Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A
2 -> B
3 -> C
...
26 -> Z
27 -> AA
28 -> AB 2.解决方案1class...
分类:
其他好文 时间:
2015-03-08 18:52:14
阅读次数:
133
Apple CatchingTime Limit: 1000msMemory Limit: 65536KBThis problem will be judged onPKU. Original ID:238564-bit integer IO format:%lld Java class name:...
分类:
移动开发 时间:
2015-03-08 15:40:24
阅读次数:
197
Milking TimeTime Limit: 1000msMemory Limit: 65536KBThis problem will be judged onPKU. Original ID:361664-bit integer IO format:%lld Java class name:Ma...
分类:
其他好文 时间:
2015-03-08 15:34:05
阅读次数:
114
SumsetsTime Limit: 2000msMemory Limit: 200000KBThis problem will be judged onPKU. Original ID:222964-bit integer IO format:%lld Java class name:MainFa...
分类:
其他好文 时间:
2015-03-08 13:00:11
阅读次数:
119
很多人只会用Collections中不带比较器Comparator的sort方法完成一些对存储整形Integer的动态数组ArrayList的简单排序,包括我之前,此前仅仅在《【Java】Java中的Collections类——Java中升级版的数据结构》(点击打开链接)介绍Collections中sort方法的简单用法。
igz
面对eclipse所给出的说明,根本就不知道这个sort方...
分类:
编程语言 时间:
2015-03-08 10:32:28
阅读次数:
234
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ...
分类:
其他好文 时间:
2015-03-08 10:26:05
阅读次数:
1355
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ...
分类:
其他好文 时间:
2015-03-07 21:18:26
阅读次数:
121
题意:给出一个形如(P)/D的多项式,其中P是n的整系数多项式,D为整数。问是否对于所有的正整数n,该多项式的值都是整数。分析:可以用数学归纳法证明,若P(n)是k次多项式,则P(n+1) - P(n)为k-1次多项式。P是n的一次多项式时,P是一个等差数列,只要验证P(1)和P(2)是D的倍数即可...
分类:
其他好文 时间:
2015-03-07 18:34:01
阅读次数:
227