Factorial Calculation
Lesson 1 of 3 in Coddy's Interview Coding Challenges - X course.
Welcome to the 10th interview challenges pack! This one is special because it focuses on recursion.
Challenge
EasyWrite a recursive function named factorial to calculate the factorial of a given non-negative integer n. The factorial of a non-negative integer n is the product of all positive integers less than or equal to n.
Try it yourself
int factorial(int n) {
// Write code here
}