Given a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then right to left for the next level and al...
分类:
其他好文 时间:
2014-07-22 22:53:33
阅读次数:
229
VectorDequeListSetMultisetmapMultimap典型内部结构dynamicarrayArray of arraysDoublyLinked listBinary treeBinary treeBinary treeBinary tree元素ValueValueValueVa...
分类:
其他好文 时间:
2014-07-22 22:53:32
阅读次数:
196
List the directories in a tree-like format
分类:
其他好文 时间:
2014-07-22 22:49:13
阅读次数:
215
Problem Description判断两序列是否为同一二叉搜索树序列Input开始一个数n,(1#include#define max 512;int main(){ int i,j,n,c; int tree[512],tree1[512]; char s[22]; ...
分类:
其他好文 时间:
2014-07-22 22:48:54
阅读次数:
181
在使用grep 搜索到字符串时,输出信息如下: Matched?to?a?binary?file:log 从打印消息上看,这个文本文件被当作二进制文件。 为什么? 用vim?打开log?发现原因,log文件有个^@字符,这其实就是c语言字符串...
分类:
其他好文 时间:
2014-07-22 08:19:36
阅读次数:
188
zabbix 更换 TokuDB 过程(我用的是percona db): wget?http://www.percona.com/redir/downloads/Percona-Server-5.6/LATEST/binary/redhat/6/x86_64/Percona-Server-tokudb-56-5.6.19-rel67.0.el6.x86_64.rpm?...
分类:
数据库 时间:
2014-07-21 10:23:35
阅读次数:
443
int main()
{
int A[] = { 1, 2, 3, 3, 3, 5, 8 };
const int N = sizeof(A) / sizeof(int);
for (int i = 1; i <= 10; ++i) {
cout << "Searching for " << i << ": "
<< (binary_search(A, A + N, i) ? "present" : "not present") << endl;
}
}
/*
...
分类:
其他好文 时间:
2014-07-19 23:29:59
阅读次数:
275
Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only n...
分类:
其他好文 时间:
2014-07-19 22:34:50
阅读次数:
196
Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.题解:如下图所示的一棵树: ...
分类:
其他好文 时间:
2014-07-19 19:00:44
阅读次数:
262
Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.类似http://www.cn...
分类:
其他好文 时间:
2014-07-19 18:19:06
阅读次数:
243