2014年12月3日

摘要: Binary Tree Inorder TraversalGiven a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3... 阅读全文
posted @ 2014-12-03 23:03 Yu's Garden 阅读(468) 评论(0) 推荐(0) 编辑
摘要: Binary Tree Preorder Traversal Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 ... 阅读全文
posted @ 2014-12-03 22:32 Yu's Garden 阅读(2367) 评论(0) 推荐(1) 编辑
摘要: Symmetric TreeGiven a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric... 阅读全文
posted @ 2014-12-03 22:13 Yu's Garden 阅读(683) 评论(0) 推荐(0) 编辑
摘要: isSameTree1Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally i... 阅读全文
posted @ 2014-12-03 22:08 Yu's Garden 阅读(408) 评论(0) 推荐(0) 编辑
摘要: Combination Sum IIGiven a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers s... 阅读全文
posted @ 2014-12-03 21:29 Yu's Garden 阅读(1090) 评论(0) 推荐(0) 编辑
摘要: Combination SumCombination Sum Total Accepted: 25850 Total Submissions: 96391 My Submissions Question Solution Given a set of candidate numbers (C) an... 阅读全文
posted @ 2014-12-03 20:39 Yu's Garden 阅读(972) 评论(1) 推荐(1) 编辑
摘要: Letter Combinations of a Phone NumberGiven a digit string, return all possible letter combinations that the number could represent.A mapping of digit ... 阅读全文
posted @ 2014-12-03 20:14 Yu's Garden 阅读(1726) 评论(0) 推荐(0) 编辑
摘要: Permutations IIGiven a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2] have the follo... 阅读全文
posted @ 2014-12-03 19:56 Yu's Garden 阅读(2937) 评论(0) 推荐(0) 编辑
摘要: PermutationsGiven a collection of numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[1,2,3], [1,3,2], [2,1... 阅读全文
posted @ 2014-12-03 19:01 Yu's Garden 阅读(1089) 评论(0) 推荐(0) 编辑
摘要: CombinationsGiven two integers n and k, return all possible combinations of k numbers out of 1 ... n.For example,If n = 4 and k = 2, a solution is:[ [... 阅读全文
posted @ 2014-12-03 18:44 Yu's Garden 阅读(927) 评论(0) 推荐(0) 编辑
摘要: Reverse Words in a String Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".clic... 阅读全文
posted @ 2014-12-03 16:40 Yu's Garden 阅读(583) 评论(0) 推荐(0) 编辑

导航