Given a collection of numbers, return all possible permutations.For example, [1,2,3] have the following permutations: [1,2,3], [1,3,2], [2,1,3], [2,3,... Read More
posted @ 2014-07-25 22:33 Xylophone Views(135) Comments(0) Diggs(0)
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.N... Read More
posted @ 2014-07-25 22:03 Xylophone Views(191) Comments(0) Diggs(0)
Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction ... Read More
posted @ 2014-07-25 20:48 Xylophone Views(211) Comments(0) Diggs(0)
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at any po... Read More
posted @ 2014-07-25 10:41 Xylophone Views(138) Comments(0) Diggs(0)
You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up: Could you do this in-place?注意知识点:容器特有的泛型算... Read More
posted @ 2014-07-25 09:08 Xylophone Views(103) Comments(0) Diggs(0)
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:"((... Read More
posted @ 2014-07-25 08:21 Xylophone Views(113) Comments(0) Diggs(0)