![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
贪婪算法
back-to-back
忙忙碌碌终日,终于一事无成。
展开
-
LeetCode 之 Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Fin原创 2016-03-17 10:02:41 · 216 阅读 · 0 评论 -
LeetCode 之 Best Time to Buy and Sell Stock II
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 (ie, buy on原创 2016-01-14 22:01:12 · 252 阅读 · 0 评论