上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 28 下一页

2015年5月27日

摘要: 题目:Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.代码:class Solution {publi... 阅读全文
posted @ 2015-05-27 11:58 承续缘 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 题目:Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all dist... 阅读全文
posted @ 2015-05-27 11:22 承续缘 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 题目:Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty spac... 阅读全文
posted @ 2015-05-27 09:01 承续缘 阅读(190) 评论(0) 推荐(0) 编辑

2015年5月26日

摘要: 题目:A robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right at any poi... 阅读全文
posted @ 2015-05-26 16:39 承续缘 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, ... 阅读全文
posted @ 2015-05-26 15:41 承续缘 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a 2D board containing'X'and'O', capture all regions surrounded by'X'.A region is captured by flipping all'O's into'X's in that surrounded reg... 阅读全文
posted @ 2015-05-26 11:06 承续缘 阅读(243) 评论(0) 推荐(0) 编辑

2015年5月25日

摘要: 题目:Given two words (startandend), and a dictionary, find all shortest transformation sequence(s) fromstarttoend, such that:Only one letter can be chan... 阅读全文
posted @ 2015-05-25 15:29 承续缘 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 题目:Given two words (beginWordandendWord), and a dictionary, find the length of shortest transformation sequence frombeginWordtoendWord, such that:Only... 阅读全文
posted @ 2015-05-25 10:47 承续缘 阅读(169) 评论(0) 推荐(0) 编辑

2015年5月22日

摘要: 题目:Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telep... 阅读全文
posted @ 2015-05-22 13:58 承续缘 阅读(221) 评论(0) 推荐(0) 编辑

2015年5月21日

摘要: 题目: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,... 阅读全文
posted @ 2015-05-21 20:46 承续缘 阅读(190) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 28 下一页

导航