上一页 1 ··· 5 6 7 8 9 10 11 12 下一页

LeetCode-74-Search a 2D Matrix

摘要: 算法描述: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are so 阅读全文
posted @ 2019-01-31 20:29 无名路人甲 阅读(74) 评论(0) 推荐(0) 编辑

LeetCode-71-Simplify Path

摘要: 算法描述: Given an absolute path for a file (Unix-style), simplify it. Or in other words, convert it to the canonical path. In a UNIX-style file system, a 阅读全文
posted @ 2019-01-30 20:32 无名路人甲 阅读(93) 评论(0) 推荐(0) 编辑

LeetCode-64-Minimum Path Sum

摘要: 算法描述: 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 阅读全文
posted @ 2019-01-30 18:51 无名路人甲 阅读(86) 评论(0) 推荐(0) 编辑

LeetCode-63-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 阅读全文
posted @ 2019-01-30 18:39 无名路人甲 阅读(86) 评论(0) 推荐(0) 编辑

LeetCode-62-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 阅读全文
posted @ 2019-01-30 17:26 无名路人甲 阅读(84) 评论(0) 推荐(0) 编辑

LeetCode-61-Rotate List

摘要: 算法描述: Given a linked list, rotate the list to the right by k places, where k is non-negative. Example 1: Example 2: 解题思路:单链表的题目,画出图就可以解决了。注意边界条件,以及k值大 阅读全文
posted @ 2019-01-30 14:27 无名路人甲 阅读(77) 评论(0) 推荐(0) 编辑

LeetCode-60-Permuataion 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 阅读全文
posted @ 2019-01-30 14:07 无名路人甲 阅读(106) 评论(0) 推荐(0) 编辑

LeetCode-59-Spiral Matrix II

摘要: 算法描述: Given a positive integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. Example: 解题思路:模拟,注意边界。 阅读全文
posted @ 2019-01-30 11:19 无名路人甲 阅读(85) 评论(0) 推荐(0) 编辑

LeetCode-56-Merge Intervals

摘要: 算法描述: Given a collection of intervals, merge all overlapping intervals. Example 1: Example 2: 解题思路:排序,比较,注意边界值,比较函数的编写。比较函数必须是静态函数。 阅读全文
posted @ 2019-01-30 10:50 无名路人甲 阅读(80) 评论(0) 推荐(0) 编辑

LeetCode-55-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 阅读全文
posted @ 2019-01-30 08:47 无名路人甲 阅读(95) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 下一页