描述
Bessie is tired of multiplying pairs of numbers the usual way, so she invented her own style of multiplication. In her style, A*B is equal to the
sum of all possible pairwise products between t...
分类:
其他好文 时间:
2015-05-26 14:29:34
阅读次数:
145
Description
The mayor of RMRCity wants to create a secure landline telephone network for emergency use in case of serious disasters when the city is cut off from the outside world. Some pairs of bu...
分类:
Web程序 时间:
2015-05-25 16:47:52
阅读次数:
234
这个问题就是OJ题里出现的取石子游戏,http://en.wikipedia.org/wiki/Wythoff%27s_game。维基里面的通项公式并不适用于算法求解。需要理解下面两条规律:1、As is true in general for pairs of Beatty sequences, ...
分类:
其他好文 时间:
2015-05-22 09:18:43
阅读次数:
106
题目链接:https://leetcode.com/problems/swap-nodes-in-pairs//*题意:将链表相邻的两两结点交换*/class Solution {public: ListNode* swapPairs(ListNode* head) { if(h...
分类:
其他好文 时间:
2015-05-20 17:57:06
阅读次数:
112
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-20 16:22:27
阅读次数:
92
题目描述: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.Yo...
分类:
编程语言 时间:
2015-05-15 19:48:35
阅读次数:
159
题目描述:Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set i...
分类:
编程语言 时间:
2015-05-14 18:38:58
阅读次数:
131
【题目】
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 constan...
分类:
其他好文 时间:
2015-05-12 09:25:09
阅读次数:
114
Problem:
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 con...
分类:
编程语言 时间:
2015-05-11 18:04:39
阅读次数:
145
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-10 17:15:33
阅读次数:
127