Recursion:Factorial (1)
Problem: Previous problem amounts to computing the factorial of N, where
Fact(N) = N * Fact(N-1)
Fact(1) = 1
Fact(4) = 4*Fact(3) = 4*3*Fact(2)
= 4*3*2*Fact(1) = 4*3*2*1
Previous slide
Next slide
Back to first slide
View graphic version