Two passes: all pointer linking info will be recorded in 1st pass - to hashmap; 2nd pass recover the pointer relationship from hashmap.1A!class Soluti...
分类:
其他好文 时间:
2014-07-23 14:59:26
阅读次数:
209
地址:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3799
Two star-crossed lovers want to meet. The two lovers are standing at distinct points in t...
分类:
其他好文 时间:
2014-07-23 13:29:04
阅读次数:
242
Problem DescriptionGiven two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 2 #include 3 using namespace std; 4 .....
分类:
其他好文 时间:
2014-07-23 12:27:06
阅读次数:
252
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-...
分类:
其他好文 时间:
2014-07-23 12:20:16
阅读次数:
205
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:
其他好文 时间:
2014-07-23 12:03:26
阅读次数:
287
题目:Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1....
分类:
编程语言 时间:
2014-07-23 12:01:46
阅读次数:
312
题目: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 题解:....
分类:
编程语言 时间:
2014-07-23 12:01:36
阅读次数:
257
题目:Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, return 1->2.Given 1->1->2->3-....
分类:
编程语言 时间:
2014-07-23 12:01:16
阅读次数:
239
题目: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.http....
分类:
编程语言 时间:
2014-07-23 12:01:06
阅读次数:
330
题目:There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should ...
分类:
编程语言 时间:
2014-07-23 11:49:36
阅读次数:
357