摘要:
"https://leetcode.com/problems/best time to buy and sell stock/" 给定一个数组,其中数组的第 i 个元素表示第 i 天的股票价格,你可以选择在其中一天买股票,然后再后面的某一天卖掉股票,求最大收益。(股票必须要先买才能卖) 这里只能买一 阅读全文
摘要:
"https://leetcode.com/problems/best time to buy and sell stock ii/" 给定一个数组,其中数组的第 i 个元素表示第 i 天的股票价格,你可以选择在其中一天买股票,然后再后面的某一天卖掉股票,求最大收益。(股票必须要先买才能卖) 这里可 阅读全文
摘要:
"https://leetcode.com/problems/maximum subarray/" 给定一个数组,找出加和最大的子数组 this problem was discussed by Jon Bentley (Sep. 1984 Vol. 27 No. 9 Communications 阅读全文