原题地址:http://oj.leetcode.com/problems/two-sum/题意:找出数组numbers中的两个数,它们的和为给定的一个数target,并返回这两个数的索引,注意这里的索引不是数组下标,而是数组下标加1。比如numbers={2,7,11,17};
target=9。那...
分类:
编程语言 时间:
2014-04-30 21:45:43
阅读次数:
528
目标:降低研发人员门槛,提高效率,去除重复引用DLL的工作,基础配置由抽象工厂处理。基础扩展/// /// DataTable 转换为List 集合///
/// 类型/// DataTable/// public static List ToList(this DataTable dt) wher...
分类:
其他好文 时间:
2014-04-30 21:27:46
阅读次数:
508
带有键的 cookie 如果一个 cookie 包含多个值的一个集合,我们就可以说
cookie 拥有键(Keys)。 在下面的例子中,我们会创建一个名为 "user" 的 cookie 集。"user" cookie 拥有包含 用户信息的键:
读取所有的 cookie 请阅读下面...
分类:
其他好文 时间:
2014-04-30 20:25:09
阅读次数:
626
原题地址:http://oj.leetcode.com/problems/3sum/题意:从一个数组中找到三个数,使这三个数的和为0。有可能存在多组解,也有可能存在重复的解,所以需要去重。比如:num=[-1,0,1,2,-1,-4];那么存在两组解:[[-1,0,1],[-1,-1,2]],解中的...
分类:
编程语言 时间:
2014-04-30 19:15:53
阅读次数:
566
最差的算法:最差的算法:去重,与数组是否有序无关public void noDups(){
//从0开始遍历 for(int i=0; i<nElems-1; i++){ //与后面每一个比较 for(j=i+1; j<nElems;
j++){ ...
分类:
其他好文 时间:
2014-04-29 12:13:47
阅读次数:
427
String[] strs = {"string--01", "string--02",
"string--03", "string--04"};List strsList =
Arrays.asList(strs);//以下语句输出:[string--01, string--02, string-...
分类:
其他好文 时间:
2014-04-29 11:33:45
阅读次数:
345
/// /// 取文本左边内容 /// /// 文本 /// 标识符 /// 左边内容 public
static string GetLeft(string str, string s) ...
分类:
其他好文 时间:
2014-04-29 11:26:47
阅读次数:
362
1.添加元素的时候,先取出数组,再向数组中添加元素:-
(void)addPeason:(AddressPeason*)peason{
if(![[peasongetName]isEqualToString:nil]) {
for(NSString*stringin[_peasonDiction.....
分类:
其他好文 时间:
2014-04-29 11:22:45
阅读次数:
535
LeyniTime Limit: 3000 MS Memory Limit: 65536 KTotal
Submit: 260(59 users) Total Accepted: 80(55 users) Rating: Special Judge:
NoDescriptionLeyni被人...
分类:
其他好文 时间:
2014-04-29 11:15:46
阅读次数:
438