摘要: Next PermutationImplement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangemen... 阅读全文
posted @ 2015-01-09 21:31 H5开发技术 阅读(181) 评论(0) 推荐(0) 编辑
摘要: Rotate ImageYou are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?假设旋转的时候... 阅读全文
posted @ 2015-01-09 20:20 H5开发技术 阅读(135) 评论(0) 推荐(0) 编辑
摘要: N-Queens IIFollow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions. 1 class Solutio... 阅读全文
posted @ 2015-01-09 18:37 H5开发技术 阅读(123) 评论(0) 推荐(0) 编辑
摘要: N-QueensThen-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-01-09 18:30 H5开发技术 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Insert IntervalGiven a set ofnon-overlappingintervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals... 阅读全文
posted @ 2015-01-09 16:30 H5开发技术 阅读(134) 评论(0) 推荐(0) 编辑