摘要:
题目:Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along its path.Note... 阅读全文
摘要:
题目:Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).Find the minimum element.Yo... 阅读全文
摘要:
题目:Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ... 阅读全文
摘要:
题目:Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted fro... 阅读全文
摘要:
题目:与上一道题几乎相同;不同之处在于array中允许有重复元素;但题目要求也简单了,只要返回true or falsehttp://www.cnblogs.com/xbf9xbf/p/4254590.html代码:oj测试通过Runtime:73 ms 1 class Solution: 2 ... 阅读全文
摘要:
题目:Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).You are given a target valu... 阅读全文
摘要:
题目:Given a collection of integers that might contain duplicates,S, return all possible subsets.Note:Elements in a subset must be in non-descending ord... 阅读全文
摘要:
题目:Given a set of distinct integers,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not... 阅读全文
摘要:
题目:Givennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining... 阅读全文
摘要:
题目:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the ... 阅读全文