Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1Trivia:This problem was inspired bythis...
分类:
其他好文 时间:
2015-08-03 00:50:28
阅读次数:
93
Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which rep...
分类:
其他好文 时间:
2015-08-02 23:12:12
阅读次数:
219
Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:
其他好文 时间:
2015-08-02 23:11:15
阅读次数:
128
转载自http://www.cnblogs.com/tail/p/4618790.html采用静态初始化的方法,可以戳下边的链接查看官方的文档介绍http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/dev_...
分类:
移动开发 时间:
2015-08-02 21:33:07
阅读次数:
138
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's.
1 3 3 2 1
...
分类:
其他好文 时间:
2015-08-02 20:08:53
阅读次数:
125
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Callingnext()will return the next...
分类:
其他好文 时间:
2015-08-02 19:47:38
阅读次数:
107
通道题意:求一个区间[1,m]内与i的互质的数的个数。这里1#include #include typedef long long LL;const int maxn = 100010;LL ans;int n,m;int fac[maxn];int prime[maxn];int facCnt;v...
分类:
其他好文 时间:
2015-08-02 19:45:56
阅读次数:
118
这是一个二叉树
8
/ 6 7
/ /
4 5
\ / 1 2 3
Preorder : {8} 6 4 1 7 5 2 3
Inorder : 4 1 6 {8} 2 5 3 7...
分类:
其他好文 时间:
2015-08-02 18:17:08
阅读次数:
119
简要代码
/*
* File : print binary tree road between leaf A and leaf B
* Date : 2015/8/2
* Author : jinya
* Assert A --> B
* traverse root , left , right ; left , root , right ; left , right , root...
分类:
其他好文 时间:
2015-08-02 16:54:43
阅读次数:
138
Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1Trivia:This problem was inspired bythis...
分类:
其他好文 时间:
2015-08-02 15:04:53
阅读次数:
73