摘要:
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
树獭君
阅读(180)
评论(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
树獭君
阅读(185)
评论(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
树獭君
阅读(178)
评论(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
树獭君
阅读(532)
评论(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
树獭君
阅读(259)
评论(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
树獭君
阅读(242)
评论(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
树獭君
阅读(130)
评论(0)
推荐(0)

浙公网安备 33010602011771号