Factorial: n! = n * (n-1) * ... * 1, with 0! = 1. Classic recursive example: return n * factorial(n - 1).
How to apply it: Trace factorial(4) = 4 * 3 * 2 * 1 * 1 = 24.
Course: AP Computer Science A · Unit: Recursion
Practice questions about Factorial on AimFive — get rubric-based feedback showing exactly which points you earned.
AP and Advanced Placement are trademarks of College Board. AimFive is not affiliated with or endorsed by College Board.