上一页 1 2 3 4 5 6 7 8 ··· 14 下一页
摘要: 标题:Permutation Sequence通过率:22.7%难度:中等The set[1,2,3,…,n]contains a total ofn! unique permutations.By listing and labeling all of the permutations in or... 阅读全文
posted @ 2015-03-23 22:51 pku_smile 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 标题:Sqrt(x)通过率:22.9%难度:中等Implementint sqrt(int x).Compute and return the square root ofx.利用二分法查找。结果一定在0到x/2+1之间,然后继续找中间值mid,如果mid*mid>x说明结果一定在0到mid-1之间... 阅读全文
posted @ 2015-03-23 21:54 pku_smile 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 标题:Permutations II通过率:25.7%难度:难Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2... 阅读全文
posted @ 2015-03-22 17:21 pku_smile 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 标题:Permutations通过率:31.7%难度:中等Given a collection of numbers, return all possible permutations.For example,[1,2,3]have the following permutations:[1,2,3... 阅读全文
posted @ 2015-03-22 17:03 pku_smile 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 题目:Generate Parentheses通过率:32.3%难度:中等Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example,... 阅读全文
posted @ 2015-03-22 17:00 pku_smile 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 标题:Combination Sum II通过率:25.1%难度:中等Given a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the cand... 阅读全文
posted @ 2015-03-20 18:59 pku_smile 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 标题:Combination Sum通过率:27.7%难度:中等Given a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numb... 阅读全文
posted @ 2015-03-20 18:49 pku_smile 阅读(161) 评论(0) 推荐(0) 编辑
摘要: String 字符串常量StringBuffer 字符串变量(线程安全)StringBuilder 字符串变量(非线程安全)简 要的说, String 类型和 StringBuffer 类型的主要性能区别其实在于 String 是不可变的对象, 因此在每次对 String 类型进行改变的时候其实都等... 阅读全文
posted @ 2015-03-20 15:54 pku_smile 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 标题:Path Sum II通过率:26.7%难度:中等Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given th... 阅读全文
posted @ 2015-03-19 16:26 pku_smile 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 标题:Sum Root to Leaf Numbers通过率:30.4%难度:中等Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example... 阅读全文
posted @ 2015-03-19 16:23 pku_smile 阅读(137) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 14 下一页