Skip to main content

Command Palette

Search for a command to run...

Climbing Stairs

Published
โ€ข1 min readโ€ขView as Markdown

๐Ÿง  Problem

You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?


๐Ÿท๏ธ Tags

Math,Dynamic Programming,Memoization


๐Ÿ“Š Difficulty

Easy

โœ… Success Rate: 51%
๐Ÿ“ฅ Submissions: 2,952,667
๐Ÿ“ˆ Accepted: 1,504,735


โค๏ธ Reactions

๐Ÿ‘ Likes: 11310
๐Ÿ‘Ž Dislikes: 350


๐Ÿ’ก Hints

To reach nth step, what could have been your previous steps? (Think about the step sizes)


๐Ÿ” Similar Questions

  • Min Cost Climbing Stairs
  • Fibonacci Number
  • N-th Tribonacci Number
1 views

More from this blog

ReStart LeetCode

540 posts