1 /** 2 * Definition for a binary tree node. 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode(int x) : val(x),
分类:
其他好文 时间:
2016-03-02 22:00:50
阅读次数:
123
题目: Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: 1 / \ 2 3 \ 5 All root-to-leaf paths are: ["1->2
分类:
其他好文 时间:
2016-02-29 23:11:43
阅读次数:
147
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 given sum. F
分类:
其他好文 时间:
2016-02-27 21:53:10
阅读次数:
138
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example:Given the below binary tree and sum
分类:
其他好文 时间:
2016-02-24 22:52:35
阅读次数:
176
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 whic
分类:
其他好文 时间:
2016-02-23 17:13:32
阅读次数:
241
112. Path Sum
My Submissions
Question
Total Accepted: 91133 Total
Submissions: 295432 Difficulty: Easy
Given a binary tree and a sum, determine if the tree has a root-to-leaf path ...
分类:
其他好文 时间:
2016-02-22 16:04:51
阅读次数:
163
Given a binary tree, return all root-to-leaf paths. 这道题主要利用一下java的一个特性,String是immutable的对象,不能修改,只能重新生成 /** * Definition of TreeNode: * public class Tr
分类:
其他好文 时间:
2016-02-21 12:57:42
阅读次数:
304
用maven打包写好的jar,在放到hive中作暂时函数时报错。 错误信息例如以下: hive> create temporary function maxvalue as "com.leaf.data.Maximum"; java.lang.SecurityException: Invalid s
分类:
其他好文 时间:
2016-02-16 20:36:53
阅读次数:
875
也刷leetcode, 先把锁掉的题目留备份好了: 156 Binary Tree Upside Down [1] Problem: Given a binary tree where all the right nodes are either leaf nodes with a sibling
分类:
其他好文 时间:
2016-02-10 12:05:05
阅读次数:
245
题目描述: Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: 1 / \ 2 3 \ 5 All root-to-leaf paths are: ["1-
分类:
编程语言 时间:
2016-02-06 18:24:31
阅读次数:
160