Compute the factorial function F(n) =! for an arbitrary nonnegative Integer n. n! 1...... (n-1). n = (n-1)!. n for n ≥ 1 and 0! = 0.1 by definition, from which of the following algorithms we can compute F(n) - F(n - 1)?
- If n >= 1 return 1 else return F(n - 1) * n
- If n = 0 return, 1 else return F(n - 1) * nAnswer
- If n = 1 return 1 else return F(n - 2) * n
- None of these
Source: MOD Special Operator — 14 Nov 2019found on TestPoint
Explanation coming soon.
