Sara

  • Home

  • Tags

  • Categories

  • Archives

  • Search

LeetCode_Unique Paths II

Posted on 2019-01-15 | In LeetCode

Unique Paths II

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 point in time. The robot is trying to reach the bottom-right corner of the grid (marked ‘Finish’ in the diagram below). Now consider if some obstacles are added to the grids. How many unique paths would there be?
(不同的路径II,只能向右或者向下移动在有路障的情况下从左上角移动到右下角的路径个数)

Read more »

LeetCode_Unique Paths

Posted on 2019-01-15 | In LeetCode

Unique Paths

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 point in time. The robot is trying to reach the bottom-right corner of the grid (marked ‘Finish’ in the diagram below). How many possible unique paths are there?
(不同的路径,只能向右或者向下移动从左上角移动到右下角的路径个数)

Read more »

LeetCode_Rotate List

Posted on 2019-01-14 | In LeetCode

Rotate Image

Given a linked list, rotate the list to the right by k places, where k is non-negative.
(k 次旋转链表)

Read more »

LeetCode_Permutation Sequence

Posted on 2019-01-13 | Edited on 2019-01-14 | In LeetCode

Permutation Sequence

The 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 sequence for n = 3: “123”, “132”, “213”, “231”, “312”, “321”. Given n and k, return the k_th permutation sequence.
(排列组合结果的第 K 项)

Read more »

LeetCode_Spiral Matrix II

Posted on 2019-01-13 | In LeetCode

Spiral Matrix II

Given a positive integer n, generate a square matrix filled with elements from 1 to n^2 in spiral order.
(螺旋式生成矩阵)

Read more »

LeetCode_Length of Last Word

Posted on 2019-01-13 | In LeetCode

Length of Last Word

Given a string s consists of upper/lower-case alphabets and empty space characters “ ”, return the length of last word in the string. If the last word does not exist, return 0.
(字符串最后一个单词的长度)

Read more »

LeetCode_Insert Interval

Posted on 2019-01-12 | In LeetCode

Insert Interval

Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initially sorted according to their start times.
(插入间隔区间)

Read more »

LeetCode_Merge Intervals

Posted on 2019-01-10 | In LeetCode

Merge Intervals

Given a collection of intervals, merge all overlapping intervals.
(合并间隔区间)

Read more »

LeetCode_Jump Game

Posted on 2019-01-10 | In LeetCode

Jump Game

Given 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 jump length at that position. Determine if you are able to reach the last index.
(跳棋游戏,确定能否到达队尾)

Read more »

LeetCode_Spiral Matrix

Posted on 2019-01-10 | Edited on 2019-01-13 | In LeetCode

Spiral Matrix

Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.
(螺旋式遍历矩阵)

Read more »
1…141516…21

Sara Han

207 posts
4 categories
40 tags
© 2019 Sara Han
Powered by Hexo v3.8.0
|
Theme – NexT.Mist v6.4.2