Recursion
6 JavaScript recursion challenges, each with test cases you can run in the browser.
- factorial — Medium. Given a non-negative integer n, return the factorial of n (n!). Factorial of a number is the product of all positive integers less than or e
- fibonacci — Medium. The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones, usually starting with 0 and 1. Write a
- mergeSort — Hard. Implement the merge sort algorithm to sort an array of numbers in ascending order.
- quickSort — Hard. Implement the quicksort algorithm to sort an array of numbers in ascending order.
- nQueens — Hard. The N-Queens puzzle is the problem of placing N chess queens on an N×N chessboard so that no two queens threaten each other. Given an intege
- sudokuSolver — Hard. Write a function that solves a Sudoku puzzle. The input will be a 9x9 board with some cells filled (non-zero) and others empty (zero).