摘要:
算法描述: 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 阅读全文
摘要:
算法描述: 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 阅读全文
摘要:
算法描述: 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 阅读全文
摘要:
算法描述: 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 阅读全文
摘要:
算法描述: 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 阅读全文
摘要:
算法描述: Given a linked list, rotate the list to the right by k places, where k is non-negative. Example 1: Example 2: 解题思路:单链表的题目,画出图就可以解决了。注意边界条件,以及k值大 阅读全文
摘要:
算法描述: 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 阅读全文
摘要:
算法描述: 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 阅读全文