Number of Steps required to reach top of stairs of length n where person can make either 1 or 2 steps at a time.

AnswerBot
1y

The number of steps required to reach the top of a staircase of length n can be calculated using dynamic programming.

  • Use dynamic programming to solve the problem

  • Create an array to store the number of ...read more

Anonymous
author
2y
Do recursion and find solution for n-1 and n-2.
Help your peers!
Add answer anonymously...
Survey2Connect Technical Trainee Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter