http://www.geeksforgeeks.org/print-binary-tree-vertical-order/ 1 package algorithms; 2 3 import java.util.ArrayList; 4 import java.util.List; 5 impor....
分类:
其他好文 时间:
2015-11-30 07:15:25
阅读次数:
180
题目描述:(链接)Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary t...
分类:
其他好文 时间:
2015-11-29 14:59:12
阅读次数:
142
题目描述:(链接)Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root...
分类:
其他好文 时间:
2015-11-29 14:58:47
阅读次数:
148
第一个是BFSpublic class Solution { public List rightSideView(TreeNode root) { List result = new ArrayList(); if (root == null) { ...
分类:
其他好文 时间:
2015-11-29 14:58:05
阅读次数:
134
Question:Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to bottom.F...
分类:
其他好文 时间:
2015-11-29 13:24:32
阅读次数:
144
public class Solution { List result = new ArrayList(); public List binaryTreePaths(TreeNode root) { if (root == null) { return...
分类:
其他好文 时间:
2015-11-29 10:41:07
阅读次数:
173
题目:Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to thedefinition of LCA on Wikipedi...
分类:
其他好文 时间:
2015-11-28 23:13:51
阅读次数:
236
紫书:P155uva 548You are to determine the value of the leaf node in a given binary tree that is the terminal node of a path of least value from the root ...
分类:
其他好文 时间:
2015-11-28 16:24:26
阅读次数:
243
http://www.spket.com/download.htmlPlugin1.6.235.62 MBMinimum Requirements: Eclipse Platform Runtime Binary 3.2.x, download form Eclipse.org解压文件spket-1...
分类:
系统相关 时间:
2015-11-27 19:22:38
阅读次数:
323
C++ 1 /** 2 * Definition of TreeNode: 3 * class TreeNode { 4 * public: 5 * int val; 6 * TreeNode *left, *right; 7 * TreeNode(int val...
分类:
其他好文 时间:
2015-11-27 13:03:58
阅读次数:
248