题目描述Give you a string S,assume the Sub-String Stri
= S[0..i] and the length of the string is N. e.g. S = "moreandmorecold", N = 15,
Str0 = "m" Str1 = ...
分类:
其他好文 时间:
2014-05-14 02:36:45
阅读次数:
314
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie
Reverse Integer
Total Accepted: 17472 Total
Submissions: 43938
Reverse digits of an integer.
Example1: x = 123, return 32...
分类:
其他好文 时间:
2014-05-14 00:59:13
阅读次数:
369
题目:Given an input string, reverse the string word
by word.For example,Given s = "the sky is blue",return "blue is sky
the".Clarification:What constitu...
分类:
其他好文 时间:
2014-05-13 22:45:04
阅读次数:
317
题目:Evaluate the value of an arithmetic expression
inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an
integer or another expr...
分类:
其他好文 时间:
2014-05-13 22:43:01
阅读次数:
335
self.isOpen = [NSMutableArray array];
for (int j = 0; j
[self.isOpen addObject:[NSNumber numberWithInt:0]];
}
-(void)buttonClick:(UIButton*)button
{
NSNumber *num ...
分类:
其他好文 时间:
2014-05-13 08:12:11
阅读次数:
264
Given an array, for example, 246135, an inversion pair is the pair whose first value is larger than its second value according to the sequence from left to right, (2,1) (4,1) (4,3) (6,1) (6,3) (6,5)....
分类:
其他好文 时间:
2014-05-13 08:03:58
阅读次数:
338
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie
Best Time to Buy and Sell Stock
Total Accepted: 13234 Total
Submissions: 43145
Say you have an array for which the ith ele...
分类:
其他好文 时间:
2014-05-13 07:30:13
阅读次数:
276
如果一个多层次的数据结构达到两级或者两级以上,举例如下:
struct A{
int array_member[100];
//其他数据成员
};
struct B{
struct A *a_ptr;
//其他数据成员
}
那么通过B类型的指针b_ptr访问A类型的array_member的某一个元素array_member[0]则需要使用b_...
分类:
编程语言 时间:
2014-05-13 06:00:59
阅读次数:
270
Action接口:publicinterfaceAction{publicStringexecute(Stringstr);}Action的两个实现publicclassUpperActionimplementsAction{privateStringmessage;publicStringgetMessage(){returnmessage;}publicvoidsetMessage(Stringstring){message=string;}publicStringexecute(Stri..
分类:
编程语言 时间:
2014-05-13 03:16:42
阅读次数:
326
目录instanceofconstructor构造函数名字鸭式辨型三种检测对象的类方式:
instanceof、constructor 、构造函数名字用法如下:1)instanceofconsole.log([1,2,3] instanceof
Array);trueconsole.log([1,2...
分类:
Web程序 时间:
2014-05-12 20:46:39
阅读次数:
426