Problem Description:Given a binary tree, return thepostordertraversal of its nodes' valuesSolution: 1 public List postorderTraversal(TreeNode root) { ...
分类:
其他好文 时间:
2014-07-07 16:45:23
阅读次数:
177
Problem Description:Given a binary tree, return thepreordertraversal of its nodes' values.Solution: 1 public List preorderTraversal(TreeNode root)...
分类:
其他好文 时间:
2014-07-07 16:34:34
阅读次数:
208
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1->2-...
分类:
其他好文 时间:
2014-07-07 16:17:00
阅读次数:
139
题目:Merge Two Sorted ListsMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the ...
分类:
其他好文 时间:
2014-07-07 14:06:19
阅读次数:
221
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.
分类:
其他好文 时间:
2014-07-02 00:24:04
阅读次数:
284
【题目】
Given a singly linked list L: L0→L1→…→Ln-1→Ln,
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
You must do this in-place without altering the nodes' values.
For example,
Given {1,2,3,4}, reorder it to {1,4,2,3}.
【题意】
给定一个链表L: L0→L1→…→Ln-1→Ln,对他重新排序成L...
分类:
其他好文 时间:
2014-06-30 10:11:14
阅读次数:
158
【题目】
Given a binary tree, return the postorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [3,2,1].
Note: Recursive solution is trivial, could you do it iteratively?
【题意】
非递归实现后续遍...
分类:
其他好文 时间:
2014-06-30 10:10:10
阅读次数:
177
题目
Clone an undirected graph. Each node in the graph contains a label and
a list of its neighbors.
OJ's undirected graph serialization:
Nodes are labeled uniquely.
We use # as a separa...
分类:
其他好文 时间:
2014-06-30 09:01:23
阅读次数:
197
【题目】
Given a binary tree, return the preorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [1,2,3].
Note: Recursive solution is trivial, could you do it iteratively?
【题意】
非递归返回先序遍历...
分类:
其他好文 时间:
2014-06-30 06:21:18
阅读次数:
334
RHEL5.5InstalltionOracle11G说明:环境说明:操作系统:RedHatEnterpriseLinux5.532bit数据库:Oracle11GRelease2其他要求:内存最低1G,swap最低2G,目录规划:Oracle基目录:$ORACLE_BASE=/pm/h/u$ORACLE_BASE=/u01/app/oracleOracle主目录:$ORACLE_HOME=$ORACLE_BASE/prod..
分类:
数据库 时间:
2014-06-29 21:20:16
阅读次数:
400