InterviewSolution
Saved Bookmarks
| 1. |
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)I had been asked this question in quiz.I'm obligated to ask this question of Factorial using Recursion topic in chapter Recursion of Data Structures & Algorithms II |
|
Answer» Correct ANSWER is (c) fact(n) = n * fact(n-1) |
|