πŸ“Š Design and Analysis of Algorithms
Q. Which of the following recursive formula can be used to find the factorial of a number?
  • (A) fact(n) = n * fact(n)
  • (B) fact(n) = n * fact(n+1)
  • (C) fact(n) = n * fact(n-1)
  • (D) fact(n) = n * fact(1)
πŸ’¬ Discuss
βœ… Correct Answer: (C) fact(n) = n * fact(n-1)

Explanation: fact(n) = n * fact(n – 1) can be used to find the factorial of a number.


Explanation by: Mr. Dubey
fact(n) = n * fact(n – 1) can be used to find the factorial of a number.

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
1048
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
94%
Success Rate