动态规划
slbyzdgz
这个作者很懒,什么都没留下…
展开
-
LeetCode--- Maximum Subarray、Unique Paths、Unique Paths II、Minimum Path Sum、Climbing Stairs
53.Maximum SubarrayGiven an integer arraynums, find the contiguous subarray(containing at least one number) which has the largest sum and return its sum.Example:Input: [-2,1,-3,4,-1,2,1,-5,4...原创 2019-08-19 20:42:49 · 137 阅读 · 0 评论 -
LeetCode---Triangle、House Robber、House Robber II
120.TriangleGiven 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 following triangle[ [2], ...原创 2019-08-19 21:50:50 · 126 阅读 · 0 评论 -
LeetCode---Perfect Squares、Longest Increasing Subsequence
279.Perfect SquaresGiven a positive integern, find the least number of perfect square numbers (for example,1, 4, 9, 16, ...) which sum ton.Example 1:Input: n = 12Output: 3 Explanation: 12...原创 2019-08-20 21:49:37 · 152 阅读 · 1 评论 -
LeetCode---Arithmetic Slices、Partition Equal Subset Sum
413.Arithmetic SlicesA sequence of number is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the same.For example, these ...原创 2019-08-21 21:47:56 · 127 阅读 · 1 评论