程序来自Program Creek前Preorder binary tree traversal is a classic interview problem about trees. The key to solve this problem is to understand the follow...
分类:
编程语言 时间:
2014-09-23 22:37:05
阅读次数:
337
原题:
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 ...
分类:
其他好文 时间:
2014-09-23 20:29:17
阅读次数:
243
package h1;
import java.lang.Thread.State;
import java.util.Stack;
public class Tree {
public static void main(String[] args) {
Tree tree = new Tree();
tree.insert(8);
tree.insert(5);
tre...
分类:
编程语言 时间:
2014-09-23 14:44:44
阅读次数:
308
题目:
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...
分类:
其他好文 时间:
2014-09-22 20:55:03
阅读次数:
203
【题目】
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 123.
Fin...
分类:
其他好文 时间:
2014-09-22 19:30:53
阅读次数:
175
Hash索引 Hash 索引结构的特殊性,其检索效率非常高,索引的检索可以一次定位,不像B-Tree 索引需要从根节点到枝节点,最后才能访问到页节点这样多次的IO访问,所以 Hash 索引的查询效率要远高于 B-Tree 索引。 可能很多人又有疑问了,既然 Hash 索引的效率要比 B-Tree ....
分类:
其他好文 时间:
2014-09-22 15:40:12
阅读次数:
297
[leetcode]Binary Tree Postorder Traversal...
分类:
其他好文 时间:
2014-09-22 14:28:42
阅读次数:
121
[leetcode]Given a binary tree, return the preorder traversal of its nodes' values....
分类:
其他好文 时间:
2014-09-22 13:38:03
阅读次数:
215
[leetcode]Given a binary tree, find its maximum depth....
分类:
其他好文 时间:
2014-09-22 13:24:42
阅读次数:
114
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.难度:90 这是一道非常综合的题目,要求在0-1矩阵中找出面积最大...
分类:
其他好文 时间:
2014-09-22 07:45:22
阅读次数:
189