recursion-joy icon indicating copy to clipboard operation
recursion-joy copied to clipboard

:hourglass: A set of recursion problems to be solved.

Recursion Joy

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

Build Status Coverage Status license

Getting Started

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

Quick Start

  1. Install npm dependencies
yarn
  1. Run tests for problems
yarn test

or to run the tests for the solutions

yarn test:solutions

Problems

Contributing

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