题目链接: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 »
题目链接: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 »
题目链接: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 »
题目链接: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 »
题目链接: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 »
题目链接: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 »
题目链接: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 »
题目链接: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 »
题目链接: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 »
题目链接: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 »