
动态规划
slbyzdgz
这个作者很懒,什么都没留下…
展开
-
LeetCode--- Maximum Subarray、Unique Paths、Unique Paths II、Minimum Path Sum、Climbing Stairs
53.Maximum Subarray Given 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 · 195 阅读 · 0 评论 -
LeetCode---Triangle、House Robber、House Robber II
120.Triangle 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 following triangle [ [2], ...原创 2019-08-19 21:50:50 · 160 阅读 · 0 评论 -
LeetCode---Perfect Squares、Longest Increasing Subsequence
279.Perfect Squares Given a positive integern, find the least number of perfect square numbers (for example,1, 4, 9, 16, ...) which sum ton. Example 1: Input: n = 12 Output: 3 Explanation: 12...原创 2019-08-20 21:49:37 · 196 阅读 · 1 评论 -
LeetCode---Arithmetic Slices、Partition Equal Subset Sum
413.Arithmetic Slices A 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 · 181 阅读 · 1 评论