---
title: "Juan Vidal Pich (@juanvp) | Hashnode"
description: "Juan Vidal Pich. Read the latest articles by Juan Vidal Pich on Hashnode."
url: "https://hashnode.com/@juanvp"
---

@juanvp

# Juan Vidal Pich

@juanvp · Joined December 2018

Juan Vidal Pich

## Comments

[You could also do away with recursion altogether by applying dynamic programming. Start with an array of 3 values \[1,2,4\] for the possibilities of the first 3 steps and then calculate the following positions as the sum of the previous 3 positions in the array. The value at N - 1 is the number of possibilities.](https://hashnode.com/posts/how-to-solve-the-staircase-problem-with-javascript-using-memoization/62c8bcbde62bf98e0fb06a4a/comment/62d04bf26b0f8eeb0e0671f3)

Comment · Article · Jul 14, 2022 · [How to Solve the Staircase Problem with JavaScript using Memoization](https://hashnode.com/posts/how-to-solve-the-staircase-problem-with-javascript-using-memoization/62c8bcbde62bf98e0fb06a4a)
