JavaScript Algorithms and Data Structures: Recursive Staircase

Recursive Staircase is a problem where you have to determine the number of ways to reach the top of a staircase, given that you can only take 1 or 2 steps at a time. Learn how to implement Recursive Staircase in JavaScript.

The Problem

There are n stairs, a person standing at the bottom wants to reach the top. The person can climb either 1 or 2 stairs at a time. Count the number of ways, the person can reach the top.

The Solution

This is an interesting problem because there are several ways of how it may be solved that illustrate different programming paradigms.

References

The Original Article can be found on https://github.com

#javascript #algorithms #datastructures

JavaScript Algorithms and Data Structures: Recursive Staircase
2.15 GEEK