yanginblackPermutation SequenceThe set [1,2,3,…,n] contains a total of n! unique permutations.Dec 12, 2015Dec 12, 2015
yanginblackSpiral Matrix IIGiven an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.Dec 12, 2015Dec 12, 2015
yanginblackLength of Last WordGiven a string s consists of upper/lower-case alphabets and empty space characters ‘ ‘, return the length of last word in the string.Dec 12, 2015Dec 12, 2015
yanginblackInsert IntervalGiven a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).Dec 11, 2015Dec 11, 2015
yanginblackMerge IntervalsGiven a collection of intervals, merge all overlapping intervals.Dec 11, 2015Dec 11, 2015
yanginblackJump game Simple VersionGiven an array of non-negative integers, you are initially positioned at the first index of the array.Dec 11, 2015Dec 11, 2015
yanginblackSpiral MatrixGiven a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.Dec 10, 2015Dec 10, 2015
yanginblackMaximumFind the contiguous subarray within an array (containing at least one number) which has the largest sum.Dec 9, 2015Dec 9, 2015
yanginblackN-QueensGiven an integer n, return all distinct solutions to the n-queens puzzle.Dec 9, 2015Dec 9, 2015