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
声明:本文完全翻译自DX SDK Documentationdepth buffer,通常被称为z-buffer或者w-buffer,是设备的一个属性,用来存储深度信息,被D3D使用。当D3D渲染一个场景到target surface的时候,它会使用depth-buffer surface上的数据,...
分类:
其他好文 时间:
2014-07-22 22:50:35
阅读次数:
211
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
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
Binary String Matching
时间限制:3000 ms | 内存限制:65535 KB
难度:3
描述
Given two strings A and B, whose alphabet consist only ‘0’ and ‘1’. Your task is only to tell how many times does A appear as...
分类:
其他好文 时间:
2014-07-19 13:26:19
阅读次数:
274