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 a ...
分类:
编程语言 时间:
2016-04-22 13:30:42
阅读次数:
158
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: " ...
分类:
其他好文 时间:
2016-04-20 17:40:35
阅读次数:
199
A children's board game consists of a square array of dots that contains lines connecting some of the pairs of adjacent dots. One part of the game req ...
分类:
其他好文 时间:
2016-04-18 20:31:52
阅读次数:
119
pairs 问题描述 pairs John 在X轴上拥有nn个点,他们的坐标分别为$(x[i],0),(i=0,1,2,…,n-1)$。 他想知道有多少对< a,b ><a,b>满足|x[b]-x[a]| \leq k(a < b)∣x[b]?x[a]∣≤k(a<b)。 输入描述 第一行包含一个正整 ...
分类:
其他好文 时间:
2016-04-12 22:13:37
阅读次数:
181
Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in order. All of the tick ...
分类:
其他好文 时间:
2016-04-12 15:49:35
阅读次数:
147
JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式。 JSON建构于两种结构: 1. “名称/值”对的集合(A collection of name/value pairs)。不同的语言中,它被理解为对象(object),记录(record),结构(stru ...
分类:
Web程序 时间:
2016-04-08 19:43:32
阅读次数:
160
Strongly Connected Components <!-- .entry-header --> A directed graph is strongly connected if there is a path between all pairs of vertices. A strong ...
分类:
其他好文 时间:
2016-04-07 09:33:20
阅读次数:
273
1. Description Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in order. ...
分类:
其他好文 时间:
2016-04-06 18:15:32
阅读次数:
152
Description For an electronic mail application you are to describe the SMTP-based communication that takes place between pairs of MTAs. The sender's U ...
分类:
其他好文 时间:
2016-04-04 10:23:36
阅读次数:
202