LeetCode --- 113. Path Sum II Mar 18, 2015

 Tags LeetCode , C++ , , 深度优先搜索

题目链接:Path Sum IIGiven 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 =... More »

0条评论

LeetCode --- 112. Path Sum Mar 18, 2015

 Tags LeetCode , C++ , , 深度优先搜索

题目链接:Path SumGiven 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.For ex... More »

0条评论

LeetCode --- 111. Minimum Depth of Binary Tree Mar 17, 2015

 Tags LeetCode , C++ , , 深度优先搜索

题目链接:Minimum Depth of Binary TreeGiven a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down t... More »

0条评论

LeetCode --- 110. Balanced Binary Tree Mar 17, 2015

 Tags LeetCode , C++ , , 深度优先搜索

题目链接:Balanced Binary TreeGiven a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which t... More »

0条评论

LeetCode --- 109. Convert Sorted List to Binary Search Tree Mar 16, 2015

 Tags LeetCode , C++ , 深度优先搜索 , 链表

题目链接:Convert Sorted List to Binary Search TreeGiven a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.这道题的要求是将有序链表... More »

0条评论

LeetCode --- 108. Convert Sorted Array to Binary Search Tree Mar 16, 2015

 Tags LeetCode , C++ , , 深度优先搜索

题目链接:Convert Sorted Array to Binary Search TreeGiven an array where elements are sorted in ascending order, convert it to a height balanced BST.这道题的要求是将有序数组转化成高度平衡的二叉搜... More »

0条评论

LeetCode --- 107. Binary Tree Level Order Traversal II Mar 16, 2015

 Tags LeetCode , C++ , , 广度优先搜索

题目链接:Binary Tree Level Order Traversal IIGiven a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from left to right, level by level ... More »

0条评论

LeetCode --- 106. Construct Binary Tree from Inorder and Postorder Traversal Mar 15, 2015

 Tags LeetCode , C++ , , 数组 , 深度优先搜索

题目链接:Construct Binary Tree from Inorder and Postorder TraversalGiven inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that dupl... More »

0条评论

LeetCode --- 105. Construct Binary Tree from Preorder and Inorder Traversal Mar 15, 2015

 Tags LeetCode , C++ , , 数组 , 深度优先搜索

题目链接:Construct Binary Tree from Preorder and Inorder TraversalGiven preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplic... More »

0条评论

LeetCode --- 104. Maximum Depth of Binary Tree Mar 14, 2015

 Tags LeetCode , C++ , , 深度优先搜索

题目链接:Maximum Depth of Binary TreeGiven 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... More »

0条评论