摘要: Combination SumGiven a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thes... 阅读全文
posted @ 2014-07-05 23:11 xchangcheng 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Given a stringsand a dictionary of wordsdict, add spaces insto construct a sentence where each word is a valid dictionary word.Return all such possibl... 阅读全文
posted @ 2014-07-05 20:15 xchangcheng 阅读(175) 评论(0) 推荐(0) 编辑
摘要: N-QueensTotal Accepted:9970Total Submissions:38919My SubmissionsThen-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no tw... 阅读全文
posted @ 2014-07-05 07:45 xchangcheng 阅读(198) 评论(0) 推荐(0) 编辑
摘要: N-Queens IIFollow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.solution:#includ... 阅读全文
posted @ 2014-07-05 07:43 xchangcheng 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Given a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence of one or more dictionary words.For exampl... 阅读全文
posted @ 2014-07-05 07:40 xchangcheng 阅读(160) 评论(0) 推荐(0) 编辑