路径
文章平均质量分 75
jmspan
这个作者很懒,什么都没留下…
展开
-
LeetCode 286. Walls and Gates(墙与门)
原题网址:https://leetcode.com/problems/walls-and-gates/You are given a m x n 2D grid initialized with these three possible values.-1 - A wall or an obstacle.0 - A gate.INF - Infinity means an em原创 2016-04-15 01:10:25 · 1178 阅读 · 0 评论 -
LeetCode 317. Shortest Distance from All Buildings(最短建筑距离)
原题网址:https://leetcode.com/problems/shortest-distance-from-all-buildings/You want to build a house on an empty land which reaches all buildings in the shortest amount of distance. You can only原创 2016-04-23 09:18:04 · 3435 阅读 · 0 评论 -
LeetCode 71. Simplify Path(简化路径)
原题网址:https://leetcode.com/problems/simplify-path/Given an absolute path for a file (Unix-style), simplify it.For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c"原创 2016-05-22 00:05:09 · 709 阅读 · 0 评论 -
LeetCode 79. Word Search(单词查找)
原题网址:https://leetcode.com/problems/word-search/Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where原创 2016-05-22 05:21:03 · 1142 阅读 · 0 评论 -
LeetCode 63. Unique Paths II(唯一路径)
原题网址:https://leetcode.com/problems/unique-paths-ii/Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle an原创 2016-05-22 00:04:41 · 308 阅读 · 0 评论 -
LeetCode 64. Minimum Path Sum(最小路径和)
原题网址:https://leetcode.com/problems/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 it原创 2016-05-21 11:59:41 · 1229 阅读 · 0 评论 -
LeetCode 48. Rotate Image(旋转)
原题网址:https://leetcode.com/problems/rotate-image/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?原创 2016-05-21 05:34:52 · 383 阅读 · 0 评论 -
LeetCode 124. Binary Tree Maximum Path Sum(二叉树最大路径和)
原题网址:https://leetcode.com/problems/binary-tree-maximum-path-sum/Given a binary tree, find the maximum path sum.For this problem, a path is defined as any sequence of nodes from some starting原创 2016-05-27 00:27:32 · 2040 阅读 · 0 评论 -
LeetCode 126. Word Ladder II(单词梯子)
原题网址:https://leetcode.com/problems/word-ladder-ii/Given two words (beginWord and endWord), and a dictionary's word list, find all shortest transformation sequence(s) from beginWord to endWord, s原创 2016-05-27 00:26:42 · 866 阅读 · 0 评论 -
LeetCode 127. Word Ladder(单词梯子)
原题网址:https://leetcode.com/problems/word-ladder/Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWor原创 2016-05-27 00:26:28 · 1092 阅读 · 0 评论 -
LeetCode 129. Sum Root to Leaf Numbers(节点求和)
原题网址:https://leetcode.com/problems/sum-root-to-leaf-numbers/Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-l原创 2016-05-27 00:26:01 · 495 阅读 · 0 评论 -
LeetCode 298. Binary Tree Longest Consecutive Sequence(二叉树最长连续序列)
原题网址:https://leetcode.com/problems/binary-tree-longest-consecutive-sequence/Given a binary tree, find the length of the longest consecutive sequence path.The path refers to any sequence原创 2016-04-17 00:08:30 · 1202 阅读 · 0 评论 -
LeetCode 174. Dungeon Game(游戏)
原题网址:https://leetcode.com/problems/dungeon-game/The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid ou原创 2016-05-25 01:35:03 · 529 阅读 · 0 评论 -
LeetCode 351. Android Unlock Patterns(安卓解锁)
原题网址:https://leetcode.com/problems/android-unlock-patterns/Given an Android 3x3 key lock screen and two integers m and n, where 1 ≤ m ≤ n ≤ 9, count the total number of unlock patterns of the An原创 2016-05-25 01:34:55 · 5377 阅读 · 0 评论 -
LeetCode 257. Binary Tree Paths
原题网址:https://leetcode.com/problems/binary-tree-paths/Given a binary tree, return all root-to-leaf paths.For example, given the following binary tree: 1 / \2 3 \ 5原创 2016-04-09 05:21:23 · 293 阅读 · 0 评论 -
LeetCode 329. Longest Increasing Path in a Matrix(矩阵内的最长递增路径)
原题网址:https://leetcode.com/problems/longest-increasing-path-in-a-matrix/Given an integer matrix, find the length of the longest increasing path.From each cell, you can either move to four dir原创 2016-04-28 01:57:37 · 1606 阅读 · 0 评论 -
437. Path Sum III
原题网址:https://leetcode.com/problems/path-sum-iii/You are given a binary tree in which each node contains an integer value.Find the number of paths that sum to a given value.The path does原创 2016-10-27 01:42:32 · 647 阅读 · 0 评论