Dynamic Programming
gexlei
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
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 path. 分析 乍看到这个题目我还以为是个图的最小路径问题,受到先入为转载 2016-09-25 15:02:04 · 260 阅读 · 0 评论 -
Count Numbers with Unique Digits
题目 Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x n. Example: Given n = 2, return 91. (The answer should be the total numbers in the range of 0 ≤ x [11,2转载 2016-10-15 00:00:34 · 270 阅读 · 0 评论 -
Integer Break
题目 Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get. For example, given n转载 2016-10-15 00:41:35 · 223 阅读 · 0 评论 -
Maximum Subarray
题目 Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4,-1,2,1,-5,4], the contiguous subarray [4,-1,转载 2016-10-30 23:22:01 · 209 阅读 · 0 评论 -
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 re转载 2016-10-30 23:48:18 · 212 阅读 · 0 评论 -
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 and empty space is marked as 1 and 0 respectively转载 2016-10-31 00:13:17 · 210 阅读 · 0 评论 -
Longest Palindromic Substring
题目 Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: Input: "babad" Output: "bab" Note: "aba" is also a valid answ转载 2016-12-12 18:48:50 · 1277 阅读 · 1 评论
分享