TheChetan

Steps

Sep 11th, 2020 (edited)
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. 1. Given a staircase of n steps. You can climb in steps of 1, 2 and 3.
  2. In how many ways can you climb the staircase?
  3.  
  4. Ex:
  5. For 4 steps:
  6. 1+1+1+1
  7. 1+1+2
  8. 1+2+1
  9. 2+1+1
  10. 1+3
  11. 3+1
  12. 2+2
  13. So answer: 7
Add Comment
Please, Sign In to add comment