AccountAuthenticatorActivity概述这是一个抽象的用于实现activity的基类,常被用于帮助 抽象认证器 (AbstractAccountAuthenticator)的具体实现(implement)。如果抽象认证器AbstractAccountAuthenticator 需...
分类:
移动开发 时间:
2014-10-15 15:50:43
阅读次数:
183
Problem:Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches zero or more of the precedin...
分类:
其他好文 时间:
2014-10-14 02:10:07
阅读次数:
221
Sqrt(x)
Total Accepted: 26074 Total
Submissions: 116517My Submissions
Implement int sqrt(int x).
Compute and return the square root of x.
题意:实现求方根 sqrt(x)
思路:二分法
对于一个数,它的方...
分类:
其他好文 时间:
2014-10-12 16:05:18
阅读次数:
160
Pow(x, n)
Total Accepted: 25273 Total
Submissions: 97470My Submissions
Implement pow(x, n).
题意:求x的n次幂
思路:二分法
n有可能是负的或正的
当n为负是,pow(x, n) = 1/pow(x, -n)
x^n = x^{n/2} *...
分类:
其他好文 时间:
2014-10-12 13:28:58
阅读次数:
169
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu...
分类:
系统相关 时间:
2014-10-11 15:57:45
阅读次数:
260
题目:LRU cacheDesign and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.get(key...
分类:
系统相关 时间:
2014-10-10 20:05:24
阅读次数:
357
Implementing a system call in Kernel 2.6.32 is somehow different fromthe method in Kernel 3.10.56.In kernel 2.6.32, we should register the system call...
分类:
其他好文 时间:
2014-10-10 07:04:24
阅读次数:
218
数组元素的结束符为'\0',串的结束符为NULL
一、strlen
#include
using namespace std;
long h_strlen(constchar*str){
assert(str!=NULL);
const char *s = str;
while (*s++);
return (s - str - 1);
}...
分类:
其他好文 时间:
2014-10-09 02:55:07
阅读次数:
190
代码:@interface HttpProcessor : NSObject { NSMutableData *buffer;}@property BOOL finished;@property (strong, nonatomic) NSString *html;@end@implement...
分类:
其他好文 时间:
2014-10-09 02:00:57
阅读次数:
141
[leetcode]Implement regular expression matching with support for '.' and '*'....
分类:
其他好文 时间:
2014-10-08 18:03:55
阅读次数:
184