摘要: Given 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: [ [2,4], [3,4 阅读全文
posted @ 2015-10-13 05:06 amazingzoe 阅读(136) 评论(0) 推荐(0)
摘要: Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2]have the following unique perm... 阅读全文
posted @ 2015-10-13 04:25 amazingzoe 阅读(161) 评论(0) 推荐(0)
摘要: Given 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,3], [2,3,1 阅读全文
posted @ 2015-10-13 02:20 amazingzoe 阅读(245) 评论(0) 推荐(0)
摘要: You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 ston... 阅读全文
posted @ 2015-10-13 02:04 amazingzoe 阅读(134) 评论(0) 推荐(0)
摘要: Follow upfor "Find Minimum in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Suppose a sort... 阅读全文
posted @ 2015-10-13 00:59 amazingzoe 阅读(131) 评论(0) 推荐(0)
摘要: Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephon... 阅读全文
posted @ 2015-10-13 00:20 amazingzoe 阅读(192) 评论(0) 推荐(0)