Menu
Coddy logo textTech

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 icon

Challenge

Easy

Write 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
}

All lessons in Interview Coding Challenges - X

1Challenges

Factorial CalculationCombination CalculationPascal's Triangle