摘要: Given a collection of intervals, merge all overlapping intervals. For example,Given [1,3], [2,6], [8,10], [15,18],return [1,6], [8,10], [... 阅读全文
posted @ 2015-08-22 17:01 gqtc 阅读(126) 评论(0) 推荐(0)
摘要: Given an integer n, generate a square matrix filled with elements from 1 to n^2 in spiral order. For example,Given n = 3,You should return ... 阅读全文
posted @ 2015-08-22 15:43 gqtc 阅读(111) 评论(0) 推荐(0)
摘要: The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer... 阅读全文
posted @ 2015-08-22 15:25 gqtc 阅读(143) 评论(0) 推荐(0)