![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
动态规划算法
低空飞行的
一枚奋勇争先的小菜鸡
展开
-
309. Best Time to Buy and Sell Stock with Cooldown
题目要求如下:Say you have an array 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原创 2016-05-25 17:00:18 · 290 阅读 · 0 评论 -
189Rotate Array 实现数组循环右移的代码
Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].Note:Try to come up as many solutions as yo原创 2016-05-26 16:42:03 · 409 阅读 · 0 评论