04 2015 档案
[Leetcode][JAVA] Convert Sorted Array to Binary Search Tree && Convert Sorted List to Binary Search Tree
摘要:Convert Sorted Array to Binary Search TreeGiven an array where elements are sorted in ascending order, convert it to a height balanced BST.很简单的二分法,只要给... 阅读全文
posted @ 2015-04-14 04:19 metalx 阅读(212) 评论(0) 推荐(0)
[Leetcode][JAVA] Minimum Depth of Binary Tree && Balanced Binary Tree && Maximum Depth of Binary Tree
摘要: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... 阅读全文
posted @ 2015-04-08 06:50 metalx 阅读(148) 评论(0) 推荐(0)
[Leetcode][JAVA] Path Sum I && II
摘要: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 give... 阅读全文
posted @ 2015-04-08 03:30 metalx 阅读(165) 评论(0) 推荐(0)