Skip to content

Commit 5b67696

Browse files
Merge pull request #2119 from CodingTestStudy2/최원준
[최원준] 2026/10/02
2 parents 22d0bee + e428019 commit 5b67696

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class Solution:
2+
def minCostClimbingStairs(self, cost: list[int]) -> int:
3+
cost.append(0)
4+
n = len(cost)
5+
for i in range(2,n):
6+
cost[i] += min(cost[i-2], cost[i-1])
7+
return cost[-1]

0 commit comments

Comments
 (0)