LeetCode 113. Path Sum II(java)

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 su...

2018-03-07 09:45:53

阅读数:15

评论数:0

LeetCode 112. Path Sum(java)

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...

2018-03-07 09:41:29

阅读数:15

评论数:0

LeetCode 95. Unique Binary Search Trees II

Given an integer n, generate all structurally unique BST’s (binary search trees) that store values 1…n.For example, Given n = 3, your program should ...

2018-01-25 03:08:43

阅读数:16

评论数:0

LeetCode 96. Unique Binary Search Trees(java)

Given n, how many structurally unique BST’s (binary search trees) that store values 1…n?For example, Given n = 3, there are a total of 5 unique BST's...

2018-01-24 07:54:50

阅读数:17

评论数:0

LeetCode 617. Merge Two Binary Trees(java)

Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are ...

2018-01-21 06:06:11

阅读数:26

评论数:0

LeetCode 337. House Robber III(java)

The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the “root.” Besides the root, each ho...

2018-01-21 05:21:50

阅读数:28

评论数:0

LeetCode 226. Invert Binary Tree(java)

Invert a binary tree. 4 / \ 2 7 / \ / \ 1 3 6 9to 4 / \ 7 2 / \ / \ 9 6 3 1解法一:递归解,对于每一个节点,其左孩子变成右孩子,右孩子变...

2018-01-20 07:31:21

阅读数:14

评论数:0

LeetCode 687. Longest Univalue Path(java)

Given a binary tree, find the length of the longest path where each node in the path has the same value. This path may or may not pass through the ro...

2018-01-19 09:17:48

阅读数:35

评论数:0

LeetCode 104. Maximum Depth of Binary Tree(java)

Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest l...

2018-01-15 08:52:59

阅读数:41

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭