Computer Science, asked by meghnagurung2788, 1 year ago

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. recursio

Answers

Answered by nitish8089
5

Your answer  (D) recursion

Answered by CoolBro003
0

D) Resursio,

 

Recursion is a process in which a function calls itself as a subroutine. This allows the function to be repeated several times, since it calls itself during its execution. Functions that incorporate recursion are called recursive functions.

Recursion is often seen as an efficient method of programming since it requires the least amount of code to perform the necessary functions. However, recursion must be incorporated carefully, since it can lead to an infinite loop if no condition is met that will terminate the function.


If you have Some more questions, then contact me at:  

              Email: [email protected]

            Youtube: shorturl.at/mnB57

Similar questions