shuaijiang's blog
  • 首页
  • 归档
  • 分类
  • 标签
  • 关于

LeetCode Spiral Matrix 2

DescriptionGiven an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example,Given n = 3, You should return the following matrix: [ [ 1, 2, 3 ], [
7月 21 2015
#leetcode

LeetCode Spiral Matrix

DescriptionGiven a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example,Given the following matrix: [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ] ]
7月 21 2015
#leetcode

LeetCode Reverse Linked List 2

DescriptionReverse a linked list from position m to n. Do it in-place and in one-pass. For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4, return 1->4->3->2->5->NULL.
7月 20 2015
#leetcode

LeetCode Subsets2

DescriptionGiven a collection of integers that might contain duplicates, nums, return all possible subsets. Note:Elements in a subset must be in non-descending order.The solution set must not contain
7月 20 2015
#leetcode

LeetCode Insertion Sort List

DescriptionSort a linked list using insertion sort. The original problem is here. The original code is here.
7月 20 2015
#leetcode

LeetCode Subsets

DescriptionGiven a set of distinct integers, nums, return all possible subsets. Note:Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.For exampl
7月 20 2015
#leetcode

LeetCode Combinations

DescriptionGiven two integers n and k, return all possible combinations of k numbers out of 1 … n. For example,If n = 4 and k = 2, a solution is: [ [2,4], [3,4], [2,3], [1,2], [1,3], [1,4]
7月 20 2015
#leetcode

LeetCode Search A 2D Matrix

DescriptionWrite an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted from left to right.The first integer of
7月 19 2015
#leetcode

LeetCode Generate Parentheses

DescriptionGiven n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: “((()))”, “(()())”, “(())()”, “()(())”,
7月 19 2015
#leetcode

LeetCode Product Of Array Except Self

DescriptionGiven an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i]. Solve it without division a
7月 17 2015
#leetcode
1…1112131415…26

搜索

Hexo Fluid
总访问量 次 总访客数 人