LeetCode --- 64. Minimum Path Sum Feb 16, 2015

 Tags LeetCode , C++ , 数组 , 动态规划

题目链接:Minimum Path SumGiven 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 pa... More »

0条评论

LeetCode --- 63. Unique Paths II Feb 16, 2015

 Tags LeetCode , C++ , 数组 , 动态规划

题目链接:Unique Paths IIFollow up for “Unique Paths”:Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty spac... More »

0条评论

LeetCode --- 62. Unique Paths Feb 16, 2015

 Tags LeetCode , C++ , 数组 , 动态规划

题目链接:Unique PathsA 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... More »

0条评论

LeetCode --- 61. Rotate List Feb 16, 2015

 Tags LeetCode , C++ , 链表 , 双指针

题目链接:Rotate ListGiven a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->5->NULL and k = 2, return ... More »

0条评论

LeetCode --- 60. Permutation Sequence Feb 9, 2015

 Tags LeetCode , C++ , 回溯 , 数学

题目链接:Permutation SequenceThe set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order,We get the following s... More »

0条评论

LeetCode --- 59. Spiral Matrix II Feb 9, 2015

 Tags LeetCode , C++ , 数组

题目链接:Spiral Matrix IIGiven 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 the foll... More »

0条评论

LeetCode --- 58. Length of Last Word Feb 9, 2015

 Tags LeetCode , C++ , 字符串

题目链接:Length 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.If the las... More »

0条评论

LeetCode --- 57. Insert Interval Feb 9, 2015

 Tags LeetCode , C++ , 数组 , 排序

题目链接:Insert IntervalGiven a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were init... More »

0条评论

LeetCode --- 56. Merge Intervals Feb 9, 2015

 Tags LeetCode , C++ , 数组 , 排序

题目链接:Merge IntervalsGiven a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18], return [1,6],[8,10],[15,18]. 这道题的要求是... More »

0条评论

LeetCode --- 55. Jump Game Feb 9, 2015

 Tags LeetCode , C++ , 数组 , 贪心

题目链接:Jump GameGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum j... More »

0条评论