题目:Given two integersnandk, return all possible combinations ofknumbers out of 1 ...n.For example,Ifn= 4 andk= 2, a solution is:[ [2,4], [3,4], [2,...
分类:
其他好文 时间:
2015-07-07 18:42:12
阅读次数:
101
很简单。 但是,如果你要离开这个页面再进来, 就没办法限制了。 除非用cookie 储存状态 给个示例 var isLock = flase; //定义全局变量 按钮点击事件: if(isLock){ alert(“操作频繁”); return fasle;} // 按钮逻辑 ,,,,,...
分类:
Web程序 时间:
2015-07-07 18:31:49
阅读次数:
166
在Adapter中复写该方法:@Overridepublic int getItemPosition(Object object) { return POSITION_NONE;}即可~~
分类:
其他好文 时间:
2015-07-07 18:27:59
阅读次数:
109
先序遍历树的每个结点,若遍历到的结点有子结点,则交换它的两个子结点。
1. 递归求解:
voidMirroRecursively(BinaryTreeNode *pNode)
{
if(NULL == pNode)
return;
if(NULL == pNode->Left && NULL== pNode->Right)...
分类:
其他好文 时间:
2015-07-07 17:06:22
阅读次数:
170
Reverse Nodes in k-Group
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.
If the number of nodes is not a multiple of k then left-out nodes in the...
分类:
其他好文 时间:
2015-07-07 17:04:14
阅读次数:
170
让超链接点击后不跳转,可以用href = "#",但是这个#就会锚点到页面最上边 点击链接后不跳转可以设置成 1.javascript:void(0); 2.javascript:; 3.return false; 4.return false; 5.## 6.#### 7.#all 如果...
分类:
Web程序 时间:
2015-07-07 16:38:10
阅读次数:
153
Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree{3,9,2...
分类:
其他好文 时间:
2015-07-07 16:30:04
阅读次数:
127
Given a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After re...
分类:
其他好文 时间:
2015-07-07 16:17:41
阅读次数:
102
js如何把字符串转换成json数据的方法function strtojson(str){ var json = eval('(' + str + ')'); return json; }方法二function strtojson(str){ var json = (new function("ret...
分类:
Web程序 时间:
2015-07-07 16:09:29
阅读次数:
146
Swap Nodes in Pairs
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 us...
分类:
其他好文 时间:
2015-07-07 14:48:58
阅读次数:
105