上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 98 下一页
摘要: Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is:"((()))... 阅读全文
posted @ 2014-11-27 10:54 Jessica程序猿 阅读(228) 评论(0) 推荐(0) 编辑
摘要: Given two integersnandk, return all possible combinations ofknumbers out of 1 ...n.For example,Ifn= 4 andk= 2, a solution is:[ [2,4], [3,4], [2,3],... 阅读全文
posted @ 2014-11-27 10:32 Jessica程序猿 阅读(146) 评论(0) 推荐(0) 编辑
摘要: Given a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Each number ... 阅读全文
posted @ 2014-11-27 09:59 Jessica程序猿 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Given a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thesamerepeated num... 阅读全文
posted @ 2014-11-27 09:13 Jessica程序猿 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 动态规划:There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following ... 阅读全文
posted @ 2014-11-26 22:46 Jessica程序猿 阅读(268) 评论(0) 推荐(0) 编辑
摘要: Divide two integers without using multiplication, division and mod operator.思路:这道题属于数值处理的题目,对于整数处理的问题,在Reverse Integer中我有提到过,比较重要的注意点在于符号和处理越界的问题。对于这道... 阅读全文
posted @ 2014-11-26 21:54 Jessica程序猿 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu... 阅读全文
posted @ 2014-11-26 17:24 Jessica程序猿 阅读(393) 评论(0) 推荐(0) 编辑
摘要: Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.参考:http://blog.csdn.net/doc_sgl/article/details/17103... 阅读全文
posted @ 2014-11-26 16:22 Jessica程序猿 阅读(161) 评论(0) 推荐(0) 编辑
摘要: Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ... 阅读全文
posted @ 2014-11-26 10:50 Jessica程序猿 阅读(216) 评论(0) 推荐(0) 编辑
摘要: A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy ... 阅读全文
posted @ 2014-11-26 09:27 Jessica程序猿 阅读(161) 评论(0) 推荐(0) 编辑
上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 98 下一页