theshy

博客园 首页 新随笔 联系 订阅 管理

2021年12月25日 #

摘要: java import java.util.Arrays; class Solution { public int lengthOfLIS(int[] nums) { int n = nums.length; int[] dp = new int[n]; Arrays.fill(dp, 1);//c 阅读全文
posted @ 2021-12-25 14:57 tziSher 阅读(33) 评论(0) 推荐(0) 编辑

摘要: dp[i]:以第i天为结尾,平滑下降阶段的数目 dp[i]=dp[i-1]+1(prices[i-1]-1==prices[i]) java class Solution { public long getDescentPeriods(int[] prices) { //init int n = p 阅读全文
posted @ 2021-12-25 14:36 tziSher 阅读(40) 评论(0) 推荐(0) 编辑