Configuration ErrorDescription: An error occurred during the processing of a configuration file required to service this request. Please review the sp...
bst :binary search tree(二叉搜索树)对于树中的每个节点n,左子树中的所有节点的关键字都小于节点n的关键字,右子树中所有节点的关键字都大于节点n的关键字struct node{ int key; struct node *left; //左节点 s...
分类:
其他好文 时间:
2014-06-28 17:06:24
阅读次数:
186
题目:Binary Tree Level Order Traversal i iii和ii的差别仅在于最后将结果逆序一下就行了,算法上基本相同个人思路:1、二叉树的层次遍历,我们一层一层地处理,用一个队列(A队列)将每一层的所有节点按照从左到右的顺序入队2、待该队列的所有节点都出队,并且用另外一个队...
分类:
其他好文 时间:
2014-06-28 17:01:33
阅读次数:
235
Given n, how many structurally unique BST's (binary search trees) that store values 1...n?For example, Given n = 3, there are a total of 5 unique BST'...
分类:
其他好文 时间:
2014-06-28 11:57:50
阅读次数:
232
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,2]...
分类:
其他好文 时间:
2014-06-28 11:26:55
阅读次数:
206
题目:Flatten Binary Tree to Linked ListGiven a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 ...
分类:
其他好文 时间:
2014-06-24 09:09:02
阅读次数:
147
1. aam 里加入一个ip的internet 2. iis里不用加上ip,但不要有host name 出现的问题: 1. 当打开站点里会出现这个错误 file not found 2. 当加授予用户权限时,用户加不上去: Sorry, we're having trouble reaching t...
分类:
其他好文 时间:
2014-06-23 07:53:04
阅读次数:
223
mysql半同步复制和异步复制的差别如上述架构图所示:在mysql异步复制的情况下,Mysql Master Server将自己的Binary Log通过复制线程传输出去以后,Mysql Master Sever就自动返回数据给客户端,而不管slave上是否接受到了这个二进制日志。在半同步复制的架构下,当master在将自己binlog发给slave上的时候,要确保slave已经接受到了这个二进制...
分类:
数据库 时间:
2014-06-22 17:00:29
阅读次数:
280
题目大意:
给出的东西要求建立一个堆,使得后面的数字满足堆的性质,而且字符串满足搜索序
思路分析:
用线段树的最大询问建树。在建树之前先排序,然后用中序遍历递归输出。
注意输入的时候的技巧。。。
#include
#include
#include
#include
#define lson num<<1,s,mid
#define rson num<<1|1,m...
分类:
其他好文 时间:
2014-06-21 21:38:34
阅读次数:
205
Divide two integers without using multiplication, division and mod operator.Analysis: 我自己用binary search做老是出TLE的错误,看了网上思路,有了如下方法:long did = dividend, l...
分类:
其他好文 时间:
2014-06-21 16:06:48
阅读次数:
144