Problem DescriptionMiceren likes exploration and he found a huge labyrinth underground!This labyrinth hasNcaves and some tunnels connecting some pairs...
分类:
其他好文 时间:
2015-05-09 20:22:53
阅读次数:
126
Map接口不是Collection接口的继承。Map接口用于维护键/值对(key/value pairs)。该接口描述了从不重复的键到值的映射。
(1) 添加、删除操作:
Object put(Object key, Object value): 将互相关联的一个关键字与一个值放入该映像。如果该关键字已经存在,那么与此关键字相关的新值将取代旧值。方法返回关键字的旧值,如果关键字原先...
分类:
编程语言 时间:
2015-05-09 16:38:06
阅读次数:
107
【题目】
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
For example, given n = 3, a solution set is:
"((()))", "(()())", "(())()", "()((...
分类:
其他好文 时间:
2015-05-09 10:16:06
阅读次数:
102
题目:
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only constant s...
分类:
其他好文 时间:
2015-05-06 15:09:58
阅读次数:
109
问题描述:Given a linked list, swap every two adjacent nodes and return its head.For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.Your algorithm should use only constant space. You...
分类:
其他好文 时间:
2015-05-06 15:07:39
阅读次数:
139
Problem DescriptionMiceren likes exploration and he found a huge labyrinth underground!This labyrinth hasNcaves and some tunnels connecting some pairs...
分类:
其他好文 时间:
2015-05-05 18:42:50
阅读次数:
205
题目:
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
For example, given n = 3, a solution set is:
"((()))", "(()())", "(())()", "()(()...
分类:
其他好文 时间:
2015-05-05 14:29:11
阅读次数:
172
ipairs 和pairs在lua中都是遍历tbale的函数但是两者有区别1.pairs遍历table中的所有的key-vale 而ipairs会根据key的数值从1开始加1递增遍历对应的table[i]值a = {[1] = "a1", [2] = "a2", [3] = "a3", [5] = ...
分类:
其他好文 时间:
2015-05-04 11:49:52
阅读次数:
124
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:"((...
分类:
编程语言 时间:
2015-05-03 17:18:23
阅读次数:
121
The Bad Luck Island is inhabited by three kinds of species: r rocks, s scissors and p papers. At some moments of time two random individuals meet (all pairs of individuals can meet equiprobably), and i...
分类:
其他好文 时间:
2015-05-02 13:56:55
阅读次数:
165