消息推送Leetcode每日一题 —— 3693. 爬楼梯 II1小时前Leetcode每日一题 —— 3693. 爬楼梯 II🌐 链接: https://linux.do/t/topic/3147539🏷️ 分组: LinuxDo论坛🕒 时间: 2026-11-10 08:50:17 LINUX DO Leetcode每日一题 —— 3693. 爬楼梯 II 思路 标准的DP,记录当前下标三种可能性最小的一种。 代码 class Solution { public int climbStairs(int n, int[] costs) { int[] dp = new int[n + 1]; dp[0] = 0; for (int i = 1; i <= n; i++) { dp[i] = dp[i - 1] + costs[i - 1] + 1; if… 1小时前