//should set firefox path //FirefoxBinary binary=new FirefoxBinary(new File("C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe")); ...
分类:
其他好文 时间:
2014-09-07 02:12:24
阅读次数:
220
用两个队列实现,交叉使用,达到判断层的目的 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right...
分类:
其他好文 时间:
2014-09-06 23:47:44
阅读次数:
261
Left-Leaning Red-Black Trees,Dagstuhl Workshop on Data Structures, Wadern, Germany, February, 2008,直接下载:http://www.cs.princeton.edu/~rs/talks/LLRB/Red...
分类:
其他好文 时间:
2014-09-06 23:40:34
阅读次数:
425
Sudoku Solver
Total Accepted: 11752 Total
Submissions: 56537My Submissions
Write a program to solve a Sudoku puzzle by filling the empty cells.
Empty cells are indicated by the character...
分类:
其他好文 时间:
2014-09-06 22:37:04
阅读次数:
244
Given an undirected weighted graph G , you should find one of spanning trees specified as follows.
The graph G is an ordered pair (V, E) , where V is a set of vertices {v1, v2,..., vn} and E is
a...
分类:
其他好文 时间:
2014-09-06 22:36:34
阅读次数:
358
整合两道差不多的题目放上来,其中第一题是第二题的基础。
1.
Given a binary tree, determine if it is height-balanced.
For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two...
分类:
其他好文 时间:
2014-09-06 21:21:03
阅读次数:
279
public class Solution { public List preorderTraversal(TreeNode root) { List result = new ArrayList(); Stack nodeStack = new Stack();...
分类:
其他好文 时间:
2014-09-05 22:17:42
阅读次数:
246
Problem Description:
Given a binary tree, flatten it to a linked list in-place.
For example,
Given
1
/ 2 5
/ \ 3 4 6
The flattened tree s...
分类:
其他好文 时间:
2014-09-05 19:57:31
阅读次数:
205
Binary Tree Level Order Traversal II
Total Accepted: 16983 Total
Submissions: 54229My Submissions
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie...
分类:
其他好文 时间:
2014-09-05 18:22:41
阅读次数:
212
Binary Tree Level Order Traversal
Total Accepted: 20571 Total
Submissions: 66679My Submissions
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left t...
分类:
其他好文 时间:
2014-09-05 18:22:21
阅读次数:
271