I have a problem to solve that takes n as an input number. The problem has a property that given the solution for (n-1), I can easily solve the problem for n. Which programming technique will I use to solve such a problem ?

A. Iteration

B. Decision-making

C. Object Oriented Programming

D. Recursion

Answer : D. Recursion

Explanation

Recursion(the repeated application of a recursive procedure) solve the problem has a property that given the solution for (n-1).

Categorized in: