本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41750865
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.
For example,
Given 1->2->3,4->5->6,...
分类:
其他好文 时间:
2014-12-06 08:55:36
阅读次数:
245
#include "iostream.h"
using namespace std;
int findMedian(int *A,int left,int right){
int center = (left+right)/2;
if(A[left]>A[center]){
swap(A[left],A[center]);
}
if(A[left]>A[right]){
swap(...
分类:
其他好文 时间:
2014-12-05 21:23:55
阅读次数:
360
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
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2014-12-05 21:07:13
阅读次数:
167
Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].Not...
分类:
其他好文 时间:
2014-12-05 17:07:57
阅读次数:
179
Vmstat命令的简单使用Vmstat命令是Linux/unix常用的系统监控工具,可以方便的查看CPU、内存、swap分区、IO读写等情况。 Vmstat常用的参数主要有两个:1.采集的时间间隔 2.采集的次数,例如 其中2.表示每格2秒采集一次服务器状态,3表示一共采集3次,如果是#vmstat...
分类:
系统相关 时间:
2014-12-05 13:59:34
阅读次数:
154
Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1].No...
分类:
其他好文 时间:
2014-12-04 21:29:50
阅读次数:
104
Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].Note...
分类:
其他好文 时间:
2014-12-04 21:25:46
阅读次数:
139
Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].Not...
分类:
其他好文 时间:
2014-12-04 21:21:05
阅读次数:
153
Partition List Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should...
分类:
其他好文 时间:
2014-12-04 19:57:46
阅读次数:
204