Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.
Below is one possible representation of s1 = "great":
great
/ gr ...
分类:
其他好文 时间:
2015-04-13 19:01:32
阅读次数:
141
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.
For example:
Given the following binary tree,
1...
分类:
其他好文 时间:
2015-04-13 18:57:59
阅读次数:
81
To search a key in a binary search tree, we start from the root and move all the way down, choosing branches according to the comparison results of th...
分类:
其他好文 时间:
2015-04-13 18:33:44
阅读次数:
110
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes w...
分类:
其他好文 时间:
2015-04-13 18:25:39
阅读次数:
144
An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any...
分类:
其他好文 时间:
2015-04-13 18:14:58
阅读次数:
243
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-04-13 18:14:54
阅读次数:
111
转:http://blog.csdn.net/huangxiaohu_coder/article/details/8497286在原生Android下编译APK,编译没有问题,但是在运行的时候经常出现如标题所描述的异常,然后整个程序Crash掉...... 我遇到该问题常常都是因为修改了资源文件所引...
分类:
移动开发 时间:
2015-04-13 15:53:40
阅读次数:
117
I saw a lot of BFS based solutions. And my alternative solution is this mirror-ed BST iterator one, with some book-keeping:class Solution {public: ...
分类:
其他好文 时间:
2015-04-13 12:22:37
阅读次数:
136
The gray code is a binary numeral system where two successive values differ in only one bit.
Given a non-negative integer n representing the total number of bits in the code, print the sequence of ...
分类:
其他好文 时间:
2015-04-13 09:30:41
阅读次数:
102