问题描述:
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 preserve the original relative order of the nodes in ...
分类:
其他好文 时间:
2014-07-30 12:21:33
阅读次数:
192
题目:Given a binary tree, return the postorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [3...
分类:
编程语言 时间:
2014-07-30 11:33:23
阅读次数:
258
题目:Given a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,3...
分类:
编程语言 时间:
2014-07-30 09:54:33
阅读次数:
195
题目:Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,...
分类:
编程语言 时间:
2014-07-30 09:49:43
阅读次数:
177
"**********BASIC**********
"设置行号
set?nu
"不要swap文件
set?nobackup
"设置兼容性关闭
set?nocompatible
"高亮显示搜索结果
set?hlsearch
"自动显示搜索情况
set?showmatch
"编码
set?encoding=utf-...
分类:
其他好文 时间:
2014-07-29 18:27:12
阅读次数:
332
WARN hdfs.DFSClient: DataStreamer Exception: org.apache.hadoop.ipc.RemoteException: java.io.IOException: File /input/LICENSE.txt could only be replicated to 0 nodes, instead of 1
at org.apache...
分类:
其他好文 时间:
2014-07-29 18:13:22
阅读次数:
227
题目:
Product
The Problem
The problem is to multiply two integers X, Y. (0250)
The Input
The input will consist of a set of pairs of lines. Each line in pair contains one mu...
分类:
其他好文 时间:
2014-07-29 18:03:42
阅读次数:
283
Problem DescriptionA tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by dire...
分类:
其他好文 时间:
2014-07-29 14:00:18
阅读次数:
255
#include
void
swap(int * p, int * q)
{
int tmp;
tmp = *p;
*p = *q;
*q = tmp;
}
void
swap1(int &p, int &q)
{
int tmp;
tmp = p;
p = q;
q = tmp;
}
int
main()
{
int a = 1, b = 2;
/* 大家都见过,不多做解释 */
swap(&a,&b);
printf("a = %d, b = %d\...
分类:
其他好文 时间:
2014-07-29 12:58:17
阅读次数:
148
Mapping the Swaps Sorting an array can be done by swapping certain pairs of adjacent entries in the array. This is the fundamental technique used in t...
分类:
移动开发 时间:
2014-07-29 12:38:06
阅读次数:
212