Unique Binary Search Trees IIGivenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your pr...
分类:
其他好文 时间:
2015-01-11 14:49:29
阅读次数:
95
Convert Sorted List to Binary Search TreeGiven a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST....
分类:
其他好文 时间:
2015-01-11 14:46:32
阅读次数:
160
题目:
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 seque...
分类:
编程语言 时间:
2015-01-11 12:27:43
阅读次数:
282
The problem:Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3retu...
分类:
其他好文 时间:
2015-01-11 12:19:10
阅读次数:
172
Convert Sorted Array to Binary Search TreeGiven an array where elements are sorted in ascending order, convert it to a height balanced BST.每次把中间元素当成根节...
分类:
其他好文 时间:
2015-01-11 12:10:19
阅读次数:
137
The problem:Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3retur...
分类:
其他好文 时间:
2015-01-11 10:54:00
阅读次数:
156
The problem:Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3retur...
分类:
其他好文 时间:
2015-01-11 10:53:49
阅读次数:
143
The problem:Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return...
分类:
其他好文 时间:
2015-01-11 06:10:46
阅读次数:
226
public static void main(String[] args) { System.out.println(GetInsertLocation(new int[]{0,2},-1)); System.out.println(GetInsertLocati...
分类:
其他好文 时间:
2015-01-11 06:09:17
阅读次数:
228
The problem:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: ...
分类:
其他好文 时间:
2015-01-11 06:09:14
阅读次数:
197