Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

爬楼梯算法 #2

Open
zhngjn opened this issue May 12, 2020 · 0 comments
Open

爬楼梯算法 #2

zhngjn opened this issue May 12, 2020 · 0 comments

Comments

@zhngjn
Copy link

zhngjn commented May 12, 2020

dp.append(dp[i-1] + dp[i-2])
应该是dp.append(dp[i-1] + 2 * dp[i-2])
爬i阶楼梯,在i-2阶之上,有两种爬法,1+1, 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant