Ilya is very fond of graphs, especially trees. During his last trip to the forest Ilya found a very interesting tree rooted at vertex 1. There is an i ...
分类:
其他好文 时间:
2017-10-17 23:02:24
阅读次数:
201
Given a binary search tree (See Definition) and a node in it, find the in-order successor of that node in the BST. If the given node has no in-order s ...
分类:
其他好文 时间:
2017-10-17 15:05:49
阅读次数:
185
class Solution { public List postorderTraversal(TreeNode root) { Stack stack=new Stack(); List res=new ArrayList(); while(root!=null||!stack.isEmpty()... ...
分类:
其他好文 时间:
2017-10-17 10:03:34
阅读次数:
88
Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R] (R >= L). You might ...
分类:
其他好文 时间:
2017-10-16 23:20:36
阅读次数:
174
Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in th ...
分类:
其他好文 时间:
2017-10-16 21:53:23
阅读次数:
121
Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume that duplicates do not exist in the tree. 给定一个二叉树的先序遍历和 ...
分类:
其他好文 时间:
2017-10-16 16:41:54
阅读次数:
137
spec文件写作规范 2008-09-28 11:52:17 分类: LINUX 1.The RPM system assumes five RPM directories BUILD:rpmbuild编译软件的目录 RPMS:rpmbuild创建的binary RPM所存放的目录 SOURCES: ...
分类:
其他好文 时间:
2017-10-16 16:31:49
阅读次数:
2652
Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. Example Given the below binary tree: 1 / \ 2 3 ret ...
分类:
其他好文 时间:
2017-10-16 09:42:57
阅读次数:
189
Given a binary tree, find the maximum path sum from root. The path may end at any node in the tree and contain at least one node in it. Example Given ...
分类:
其他好文 时间:
2017-10-16 09:40:35
阅读次数:
129