function urlArgs(){ var args={}; var query=location.search.substring(1); var pairs=query.split('&'); for(var i=0;i<pairs.length;i++){ var pos=p...
分类:
Web程序 时间:
2014-12-13 20:30:43
阅读次数:
154
题目
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 ...
分类:
其他好文 时间:
2014-12-10 16:26:18
阅读次数:
123
Problem DescriptionYour task is to Calculate a + b.InputThe input will consist of a series of pairs of integers a and b, separated by a space, one pai...
分类:
其他好文 时间:
2014-12-05 21:13:59
阅读次数:
150
我的代码是这样的:class Solution {public: ListNode *swapPairs(ListNode *head) { const int TRUE = 1; const int FALSE = 0; ListNod...
分类:
其他好文 时间:
2014-12-04 13:32:21
阅读次数:
152
1.Pairs(对组) (1)class pair可以将两个值视为一个单元。任何函数需返回两个值,也需要pair。 (2)便捷地创建pair对象可以使用make_pair函数 std::make_pair(32,'@') 等价于 std::pair(int,char)(42,'@')
分类:
编程语言 时间:
2014-11-30 18:42:18
阅读次数:
160
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...
分类:
其他好文 时间:
2014-11-29 21:37:39
阅读次数:
365
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:
"((()))", "(()())", "(())()", "()(())", "()()...
分类:
编程语言 时间:
2014-11-29 10:32:48
阅读次数:
177
Mapping the SwapsSorting an array can be done by swapping certain pairs of adjacent entries in the array. This is the fundamental technique used in th...
分类:
其他好文 时间:
2014-11-28 21:19:28
阅读次数:
245
DivisionWrite a program that finds and displays all pairs of 5-digit numbers that between them use the digits0through9once each, such that the first n...
分类:
其他好文 时间:
2014-11-26 14:08:05
阅读次数:
157
Description
The problem is to multiply two integers X, Y. (0
Input
The input will consist of a set of pairs of lines. Each line in pair contains one multiplyer.
Output
For...
分类:
其他好文 时间:
2014-11-25 14:39:45
阅读次数:
169