:hourglass: A set of recursion problems to be solved.
A set of recursion problems to be solved (solutions included).
The goal is to work under the directory /problems
. Implement a solution to get the test(s) to pass. You can find solutions under /solutions
.
What on Earth is Recursion? - Computerphile
It is important to identify the base case(s). Base cases tell a recursive function when to stop, preventing recursive functions from calling itself infinitely.
Double check base cases if you encouter this error in the test output:
RangeError: Maximum call stack size exceeded
yarn
yarn test
or to run the tests for the solutions
yarn test:solutions
PRs welcomed! Just submit a PR with a note (new recursion problem? better performance? readibility? bug fix? better testing?)