上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 22 下一页
摘要: QuestionThe demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid ... 阅读全文
posted @ 2015-10-18 13:18 树獭君 阅读(172) 评论(0) 推荐(0) 编辑
摘要: QuestionThe gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the tota... 阅读全文
posted @ 2015-10-18 09:07 树獭君 阅读(181) 评论(0) 推荐(0) 编辑
摘要: QuestionFollow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.SolutionThis proble... 阅读全文
posted @ 2015-10-18 04:09 树獭君 阅读(171) 评论(0) 推荐(0) 编辑
摘要: QuestionThen-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all... 阅读全文
posted @ 2015-10-18 03:50 树獭君 阅读(528) 评论(0) 推荐(0) 编辑
摘要: QuestionGiven two integersnandk, return all possible combinations ofknumbers out of 1 ...n.For example,Ifn= 4 andk= 2, a solution is:[ [2,4], [3,4],... 阅读全文
posted @ 2015-10-18 02:43 树獭君 阅读(204) 评论(0) 推荐(0) 编辑
摘要: QuestionThe set[1,2,3,…,n]contains a total ofn! unique permutations.By listing and labeling all of the permutations in order,We get the following sequ... 阅读全文
posted @ 2015-10-18 01:22 树獭君 阅读(224) 评论(0) 推荐(0) 编辑
摘要: QuestionGivennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is... 阅读全文
posted @ 2015-10-18 01:07 树獭君 阅读(125) 评论(0) 推荐(0) 编辑
摘要: QuestionGiven a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the ... 阅读全文
posted @ 2015-10-17 22:28 树獭君 阅读(208) 评论(0) 推荐(0) 编辑
摘要: Question 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 阅读全文
posted @ 2015-10-16 10:27 树獭君 阅读(188) 评论(0) 推荐(0) 编辑
摘要: QuestionGiven a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Each... 阅读全文
posted @ 2015-10-16 10:22 树獭君 阅读(135) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 22 下一页