![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
动态规划
韵影
这个作者很懒,什么都没留下…
展开
-
123. Best Time to Buy and Sell Stock III
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete at mosttwotransactions.Note:You may not engage in multiple transactions at the same time (i.e., y...原创 2020-11-13 22:31:53 · 84 阅读 · 0 评论 -
309. Best Time to Buy and Sell Stock with Cooldown
Your are given an array of integers prices, for which the i-th element is the price of a given stock on day i; and a non-negative integer fee representing a transaction fee.You may complete as many transactions as you like, but you need to pay the transa原创 2020-11-13 12:38:02 · 53 阅读 · 0 评论 -
122. Best Time to Buy and Sell Stock II
Say you have an array prices for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complete as many transactions as you like (i.e., buy one and sell one share of the stock multiple times)原创 2020-11-13 11:24:40 · 48 阅读 · 0 评论 -
121. Best Time to Buy and Sell Stock
题目描述121. Best Time to Buy and Sell Stock难度简单1295Say you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock), d...原创 2020-11-13 10:44:28 · 53 阅读 · 0 评论 -
Leetcode 198. House Robber
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are arranged in a circle. That means the first house is the neighbor of the last one. Meanwhile, adjacent houses原创 2020-11-01 17:40:32 · 70 阅读 · 0 评论 -
Leetcode 213House Robber II
213. House Robber II难度中等406You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place arearranged in a circle.That means the first house is the neighbor of the last ..原创 2020-11-01 18:15:37 · 74 阅读 · 0 评论