http{limit_conn_zone$binary_remote_addrzone=conn:10m;server{location/{limit_connconn2;}}}limit_conn_zone用在http段。limit_conn可以用在http,server,location区段。nginx新语法limit_conn_zone替换limit_conn用法对应conf文件夹中的nginx.conf文件,将limit_conn替换..
分类:
其他好文 时间:
2014-09-25 17:11:59
阅读次数:
236
今天项目上报出了一个这样的问题,如下:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.csii.jincheng/com.csii.ui.MainMenuActivity}: java.lang.RuntimeException: Binary XML file line #1: You must s...
分类:
其他好文 时间:
2014-09-25 13:12:08
阅读次数:
279
Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].思路:...
分类:
其他好文 时间:
2014-09-25 03:56:48
阅读次数:
215
Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1].思路...
分类:
其他好文 时间:
2014-09-24 22:57:37
阅读次数:
187
第一节、B树、B+树、B*树 1.前言: 动态查找树主要有:二叉查找树(Binary Search Tree),平衡二叉查找树(Balanced Binary Search Tree),红黑树(Red-Black Tree ),B-tree/B+-tree/ B*-tree?(B~Tree)。前三者...
分类:
其他好文 时间:
2014-09-24 21:46:38
阅读次数:
244
同num8一样,此题考查的是二叉树的中序遍历,即先左子树再节点再右子树、
使用迭代法时,采用将节点和左子树均压入栈的方法,当左子树为NULL时,将top节点弹出,并存入结果列表,将next指针指向该节点的右节点
代码如下:
/**
* Definition for binary tree
* struct TreeNode {
* int val;
* Tre...
分类:
其他好文 时间:
2014-09-24 20:04:07
阅读次数:
177
【求最大深度】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 leaf node.
这里说的最大深度是指最深叶子节点到根节点的路径长度
...
分类:
其他好文 时间:
2014-09-24 16:09:37
阅读次数:
200
题目:Given a binary tree, return the preorder traversal
of its nodes' values.
此题即为二叉树的前序遍历,递归的方法很简单:先节点再左子树再右子树;迭代的方法可以利用栈存储来完成遍历过程。
补充递归与迭代的区别:许多问题是以递归的形式进行解释的,这只是因为它比非递归形式更为清晰。但是,这些问题的迭代往往比递归实现效率更...
分类:
其他好文 时间:
2014-09-24 11:24:56
阅读次数:
206
http://acm.hdu.edu.cn/showproblem.php?pid=1710已知先序和中序遍历,求后序遍历二叉树。思路:先递归建树的过程,后后序遍历。Binary Tree TraversalsTime Limit: 1000/1000 MS (Java/Others)Memory ...
分类:
其他好文 时间:
2014-09-23 22:38:55
阅读次数:
237