1.

In general, which of the following methods isn’t used to find the factorial of a number?(a) Recursion(b) Iteration(c) Dynamic programming(d) Non iterative / recursiveThis question was addressed to me in an interview.I want to ask this question from Factorial using Recursion in section Recursion of Data Structures & Algorithms II

Answer»

Correct answer is (d) Non iterative / recursive

Easy explanation - In general we USE recursion, ITERATION and dynamic programming to FIND the factorial of a number. We can also implement without using iterative / recursive method by using tgammal() method. Most of us never use it generally.



Discussion

No Comment Found

Related InterviewSolutions