Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).
For example:
Given binary tree {3,9,20,#,#,15,7},
3
/ 9 20
...
分类:
其他好文 时间:
2015-04-29 00:47:26
阅读次数:
142
题目大意:给定一个集合SS,对于i=1...mi=1...m求有多少二叉树满足每个节点的权值都在集合SS中且权值和为ii
构造答案多项式F(x)F(x)和集合SS的生成函数C(x)C(x),那么
根节点的左子树是一棵二叉树,右子树是一棵二叉树,本身的权值必须在集合S中,此外还有空树的情况
故有F(x)=F2(x)C(x)+1F(x)=F^2(x)C(x)+1
解得F(x)=1±1?4C(x)...
分类:
其他好文 时间:
2015-04-28 22:58:20
阅读次数:
246
Given preorder and inorder traversal of a tree, construct the binary tree.Note:
You may assume that duplicates do not exist in the tree....
分类:
其他好文 时间:
2015-04-28 22:52:42
阅读次数:
199
按照官网给定的指导,执行下面的步骤即可1.Import the dubbo source code to eclipse project 在eclipse中安装git插件 egit 直接可以从github上拉代码2. Build the dubbo binary package: cd ~/dubb...
分类:
其他好文 时间:
2015-04-28 22:31:46
阅读次数:
240
题目来自于LeetCode
https://leetcode.com/problems/flatten-binary-tree-to-linked-list/
Given a binary tree, flatten it to a linked list in-place.
For example,
Given
1
...
分类:
其他好文 时间:
2015-04-28 21:07:40
阅读次数:
137
1.同步端和被同步端都需要安装rsync服务: #yum? install?? rsync 2.同步端还需要安装serync #wget????https://sersync.googlecode.com/files/sersync2.5.4_64bit_binary_stable_final.tar.gz
#tar???z...
分类:
其他好文 时间:
2015-04-28 19:06:41
阅读次数:
215
STL中的二分查找——lower_bound 、upper_bound 、binary_search 二分查找很简单,原理就不说了。STL中关于二分查找的函数有三个lower_bound 、upper_bound 、binary_search 。这三个函数都运用于有序区间(当然这也是运用二分查找的前...
分类:
其他好文 时间:
2015-04-28 15:34:17
阅读次数:
222
problem:
Given a binary tree containing digits from 0-9 only,
each root-to-leaf path could represent a number.
An example is the root-to-leaf path 1->2->3 which
represents the number...
分类:
其他好文 时间:
2015-04-28 11:48:32
阅读次数:
160
LBP(Local Binary Pattern,局部二值模式)是一种用来描述图像局部纹理特征的算子;它具有旋转不变性和灰度不变性等显著的优点。它是首先由T. Ojala, M.Pietikäinen,和D. Harwood在1994年提出,用于纹理特征提取。而且,提取的特征是图像的局部的纹理特征;...
分类:
其他好文 时间:
2015-04-28 08:18:30
阅读次数:
204
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
For example, this binary tree is symmetric:
1
/ 2 2
/ \ / 3 4 4 3
But the f...
分类:
其他好文 时间:
2015-04-27 15:14:27
阅读次数:
101