题目: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-07-14 13:23:34
阅读次数:
107
题目:Invert Binary TreeTotal Accepted:20346Total Submissions:57084My SubmissionsQuestionSolutionInvert a binary tree. 4 / \ 2 7 / \ / \1 ...
分类:
其他好文 时间:
2015-07-14 13:09:59
阅读次数:
140
Question:Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the giv...
分类:
其他好文 时间:
2015-07-14 13:09:48
阅读次数:
104
Given a binary tree, return the inorder traversal of its nodes’ values.For example:
Given binary tree {1,#,2,3},
return [1,3,2].Note: Recursive solution is trivial, could you do it iteratively?二叉树的...
分类:
其他好文 时间:
2015-07-14 11:42:35
阅读次数:
94
Given a binary tree, return the preorder traversal of its nodes’ values.For example:
Given binary tree {1,#,2,3},
return [1,2,3].Note: Recursive solution is trivial, could you do it iteratively?先序遍...
分类:
其他好文 时间:
2015-07-14 11:30:36
阅读次数:
133
Hive数据类型基础数据类型:TINYINT,SMALLINT,INT,BIGINT,BOOLEAN,FLOAT,DOUBLE,STRING,BINARY,TIMESTAMP,DECIMAL,CHAR,VARCHAR,DATE。复杂数据类型:包括ARRAY,MAP,STRUCT,UNION,这些复杂类型是由基础类型组成的。ARRAY:ARRAY类型是由一系列相同数据类型元素组成的,这些元素可以通过下...
分类:
其他好文 时间:
2015-07-14 11:28:35
阅读次数:
146
题目Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between t...
分类:
其他好文 时间:
2015-07-14 10:09:09
阅读次数:
219
Sum Root to Leaf NumbersGiven a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-l...
分类:
其他好文 时间:
2015-07-14 09:50:01
阅读次数:
106
leetcode 236: Lowest Common Ancestor of a Binary Tree
PYTHON, JAVA, C++...
分类:
其他好文 时间:
2015-07-14 06:16:08
阅读次数:
180
Lowest Common Ancestor of a Binary TreeGiven a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.According to thedefin...
分类:
编程语言 时间:
2015-07-14 00:02:45
阅读次数:
263