⌛️ A set of recursion problems to be solved
JavaScript
Pull request Compare This branch is even with hzhu:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
internals
problems
solutions
.gitignore
LICENSE
README.md
package.json

README.md

Recursion Joy

A set of recursion problems to be solved (solutions included).

Build Status Coverage Status license

Getting Started

The aim is to work under the directory /problems. First, write a test(s) for the recursive function. Then implement a solution to get the test(s) to pass. You can find solutions under /solutions.

What on Earth is Recursion? - Computerphile

Due to the nature of recursion, it is critical to identify the base case(s). Base cases tell a recursive function when to stop, preventing the function from calling infinitly.

Double check base cases if you encouter this error in the test output:

  RangeError: Maximum call stack size exceeded

The unit test setup is based on karma-template boilerplate.

Quick Start

1) Install npm dependencies

npm install

2) Run unit tests

npm test

or to continously watch tests with

npm run test:watch

Problems

Contributing

PRs welcomed! Just submit a PR with a note (new recursion problem? better performance? readibility? bug fix? better testing?)