摘要:
今天是第五十二天,依旧是动态规划专题 300.最长递增子序列 class Solution { public int lengthOfLIS(int[] nums) { int[] dp = new int[nums.length]; Arrays.fill(dp, 1); for (int i = 阅读全文
posted @ 2022-12-03 16:27
小猫Soda
阅读(34)
评论(0)
推荐(0)
摘要:
今天是第五十一天,继续动态规划里的股票问题 309.最佳买卖股票时机含冷冻期 class Solution { public int maxProfit(int[] prices) { int n = prices.length; int[][] dp = new int[n][2]; if(n<2 阅读全文
posted @ 2022-12-03 03:17
小猫Soda
阅读(18)
评论(0)
推荐(0)

浙公网安备 33010602011771号