We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
No description provided.
The text was updated successfully, but these errors were encountered:
/** * @param {number} n * @return {number} */ var climbStairs = function(n) { if(n <= 2) return n; let dp = []; dp[1] = 1; dp[2] = 2; for(let i = 3; i <= n; i++){ let sum = dp[1] + dp[2]; dp[1] = dp[2]; dp[2] = sum; } return dp[2] };
Sorry, something went wrong.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: