Programming Recursion Intermediate

Problem - 4796

Design an algorithm that finds the number of ways in which you can traverse $N$ meters by doing jumps of $1$, $2$, $3$, $4$, or $5$ meter lengths.


This problem can be solved using the recursive techniques. Let $n(k)$ represent the number of ways we can reach distance of $k$, then we have $$n(k)=n(k-1)+n(k-2) + n(k-3) + n(k-4) + n(k-5)$$

The following algorithm is inspired by the above recursion:

report an error