摘要: 问题就是一个数组,代表每天的股票价格,买了再卖找到最大的利润值 1.只许买卖一次 ###动态规划or最小前缀值 public int maximumDifference(int[] nums) { if (nums.length==0||nums==null)return -1; int res=- 阅读全文
posted @ 2022-02-26 20:16 荧惑微光 阅读(33) 评论(0) 推荐(0) 编辑