Boostable

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  C/C++

摘要:LeetCode: Restore IP AddressesGiven a string containing only digits, restore it by returning all possible valid IP address combinations. For example:G... 阅读全文
posted @ 2014-08-31 22:00 Boostable 阅读(242) 评论(0) 推荐(0)

摘要:LeetCode: Binary Tree Inorder TraversalGiven a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}... 阅读全文
posted @ 2014-08-31 21:49 Boostable 阅读(309) 评论(0) 推荐(0)

摘要:LeetCode: Unique Binary Search TreesGiven n, how many structurally unique BST's (binary search trees) that store values 1...n? For example,Given n = 3... 阅读全文
posted @ 2014-08-31 21:43 Boostable 阅读(225) 评论(0) 推荐(0)

摘要:LeetCode: Interleaving StringGiven s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example,Given:s1 = "aabcc",s2 = "dbbca"... 阅读全文
posted @ 2014-08-28 22:42 Boostable 阅读(305) 评论(0) 推荐(0)

摘要:LeetCode: Validata Binary Search TreeGiven a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The l... 阅读全文
posted @ 2014-08-28 22:29 Boostable 阅读(151) 评论(0) 推荐(0)

摘要:LeetCode: Recover Binary Search TreeTwo elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.... 阅读全文
posted @ 2014-08-28 22:26 Boostable 阅读(185) 评论(0) 推荐(0)

摘要:LeetCode: Same TreeGiven two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are struct... 阅读全文
posted @ 2014-08-28 22:14 Boostable 阅读(235) 评论(0) 推荐(0)

摘要:LeetCode: Symmetric TreeGiven a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is... 阅读全文
posted @ 2014-08-28 22:12 Boostable 阅读(264) 评论(0) 推荐(0)

摘要:LeetCode: Binary Tree Zigzag Level Order TraversalGiven a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to... 阅读全文
posted @ 2014-08-27 21:42 Boostable 阅读(263) 评论(0) 推荐(0)

摘要:LeetCode: 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... 阅读全文
posted @ 2014-08-27 21:37 Boostable 阅读(162) 评论(0) 推荐(0)

摘要:LeetCode: Construct Binary Tree from Preorder and Inorder TraversalGiven preorder and inorder traversal of a tree, construct the binary tree.Note:You ... 阅读全文
posted @ 2014-08-27 21:34 Boostable 阅读(136) 评论(0) 推荐(0)

摘要:LeetCode: Construct Binary Tree from Inorder and Postorder TraversalGiven inorder and postorder traversal of a tree, construct the binary tree.Note:Yo... 阅读全文
posted @ 2014-08-27 21:31 Boostable 阅读(169) 评论(0) 推荐(0)

摘要:LeetCode: Binary Tree Level Order TraversalGiven a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level ... 阅读全文
posted @ 2014-08-27 21:28 Boostable 阅读(390) 评论(0) 推荐(0)

摘要:LeetCode: Convert Sorted Array to Binary Search TreeGiven an array where elements are sorted in ascending order, convert it to a height balanced BST.地... 阅读全文
posted @ 2014-08-27 21:19 Boostable 阅读(152) 评论(0) 推荐(0)

摘要:LeetCode: Convert Sorted List to Binary Search TreeGiven a singly linked list where elements are sorted in ascending order, convert it to a height bal... 阅读全文
posted @ 2014-08-27 21:16 Boostable 阅读(113) 评论(0) 推荐(0)

摘要:LeetCode: Balanced Binary TreeGiven a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a ... 阅读全文
posted @ 2014-08-27 21:02 Boostable 阅读(282) 评论(0) 推荐(0)

摘要:LeetCode: Minimum Depth of Binary TreeGiven a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path fro... 阅读全文
posted @ 2014-08-26 22:40 Boostable 阅读(153) 评论(0) 推荐(0)

摘要:LeetCode: 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 equal... 阅读全文
posted @ 2014-08-26 22:37 Boostable 阅读(235) 评论(0) 推荐(0)

摘要:LeetCode: Flatten Binary Tree to Linked ListGiven a binary tree, flatten it to a linked list in-place. For example,Given 1 / \ 2 ... 阅读全文
posted @ 2014-08-26 22:32 Boostable 阅读(164) 评论(0) 推荐(0)

摘要:LeetCode: Distinct SubsequencesGiven a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new... 阅读全文
posted @ 2014-08-26 22:24 Boostable 阅读(248) 评论(0) 推荐(0)