Factorial
Implement the factorial function recursively.
n! = 1 * 2 * 3 * ... * n
Recursive definition
0! = 1
n! = n * (n-1)!
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
Implement the factorial function recursively.
n! = 1 * 2 * 3 * ... * n
0! = 1
n! = n * (n-1)!