You are trying to explain recursion to your friend and tell them about a factorial of a positive integer. You are writing the following:
factorial (X) :
- If X is 1, factorial is 1.
- If X is not 1, see:
Is the algorithm correct?
You are trying to explain recursion to your friend and tell them about a factorial of a positive integer. You are writing the following:
factorial (X) :
Is the algorithm correct?
Create a free account to access the full topic