摘要: 1、leetcode122 买卖股票的最佳时机Ⅱ 思路 局部最优:收集每天的正利润,全局最优:求得最大利润。通过局部最优推出全局最优 代码 class Solution { int maxBenefit = 0; public int maxProfit(int[] prices) { for(in 阅读全文
posted @ 2023-02-15 22:52 黄三七 阅读(18) 评论(0) 推荐(0)