
LeetCode动态规划
文章平均质量分 79
BoomHusky
计算机专业硕士,希望自己的实力能够更强
展开
-
LeetCode | 553. Optimal Division Dp
Givena list of positiveintegers, the adjacent integers will performthe float division. For example, [2,3,4] -> 2 / 3 / 4.However,you can add any number of parenthesis at any position to change the原创 2018-02-01 20:14:06 · 236 阅读 · 0 评论 -
LeetCode | 673. Number of Longest Increasing Subsequence中等偏难题 找寻数组里面最大长度的子串的个数
Givenan unsorted array of integers, find the number of longest increasingsubsequence.Example1:Input: [1,3,5,4,7]Output: 2Explanation: The two longest increasing subsequenceare [1, 3, 4, 7] and [1, 3,原创 2018-01-18 17:58:36 · 239 阅读 · 0 评论 -
LeetCode | 343. Integer Break Dp
Given a positive integer n, break it into the sum of atleast two positive integersand maximize the product of those integers. Return the maximum product you canget.For example, given n =2, return 1 (2...原创 2018-05-01 13:14:25 · 165 阅读 · 0 评论 -
LeetCode | 188. Best Time to Buy and Sell Stock IV DP难题
Say you have an array for which the ith elementis the price of a given stock on day i.Design an algorithm to find the maximum profit. You may completeat most k transactions.Note:You may not engage in ...原创 2018-04-24 10:36:06 · 297 阅读 · 0 评论 -
LeetCode | 300. Longest Increasing Subsequence Dp
Given an unsorted array of integers, find the length of longestincreasing subsequence.For example,Given [10, 9, 2, 5, 3, 7, 101, 18],The longest increasing subsequence is [2, 3, 7, 101],therefore the ...原创 2018-04-26 22:11:07 · 209 阅读 · 0 评论