• 2024-07-18COMP9021 Principles of Programming Coding Quiz 5
     COMP9021PrinciplesofProgrammingTerm2,2024CodingQuiz5Worth4marksanddueWeek8Thursday@9pmDescriptionYouareprovidedwithastubinwhichyouneedtoinsertyourcodewhereindicatedwithoutdoinganychangestotheexistingcode
  • 2023-08-18[LeetCode][70]climbing-stairs
    ContentYouareclimbingastaircase.Ittakesnstepstoreachthetop.Eachtimeyoucaneitherclimb1or2steps.Inhowmanydistinctwayscanyouclimbtothetop? Example1:Input:n=2Output:2Explanation:Therearetwowaystoclimbtothet
  • 2023-06-19Climbing Stairs
    Youareclimbingastaircase.Ittakesnstepstoreachthetop.Eachtimeyoucaneitherclimb1or2steps.Inhowmanydistinctwayscanyouclimbtothetop?Example1:Input:n=2Output:2Explanation:Therearetwowaystoclimbtothetop.1.1
  • 2023-06-14Dynamic Programming
    DescriptionUsually,One-dimensionaldynamicplanningproblem,theparameterisalways$n$,theresultissimilartonumbersequence$a_n$,or$f(n)$($f$canbeviewedasfunctionorcorrespondingrelationship).Atthesametime,therewillbecertaincor
  • 2023-05-2670. Climbing Stairs刷题笔记
    问题描述该题考察的是动态规划classSolution:defclimbStairs(self,n:int)->int:dp=[0]*nifn==1:return1dp[0]=1dp[1]=2foriinrange(2,n):dp[i]=dp[i-1]+dp[i-2]ret
  • 2023-01-1170. Climbing Stairs
    第一次自己想到用dpclassSolution{public:intdp[100];intclimbStairs(intn){dp[0]=1;dp[1]=1;for(inti=2;i<100;++i)dp[i]=dp[i-1]
  • 2022-11-08CF1553I Stairs 题解
    linkSolution虽然但是,这个sb题目真的很sb,不知道怎么评到3400的,也不知道为什么我又没有做出来
  • 2022-10-18LeetCode 70. Climbing Stairs
    ​​题目​​classSolution{public:intdp[10005];intclimbStairs(intn){dp[1]=1;dp[2]=2;for(inti=3;i<=n;i++)
  • 2022-10-0570.climbing-stairs 爬楼梯
    题目描述70.爬楼梯解题思路本质上与斐波那契数是一样的:\(a_n=a_{n-1}+a_{n-2}\)构建for循环来遍历。代码classSolution{public:intclimbStairs(i