摘要:
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 ... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
Combination SumCombination Sum Total Accepted: 25850 Total Submissions: 96391 My Submissions Question Solution Given a set of candidate numbers (C) an... 阅读全文
摘要:
Letter Combinations of a Phone NumberGiven a digit string, return all possible letter combinations that the number could represent.A mapping of digit ... 阅读全文
摘要:
Permutations IIGiven a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2] have the follo... 阅读全文
摘要:
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... 阅读全文
摘要:
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:[ [... 阅读全文
摘要:
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... 阅读全文