+ 2
Anyone know Recursion tree method, substitution method and master theorm method?
Anyone can explain that method with algorithm please, Exam are near but don't have concept, I will be thankful....
2 odpowiedzi
+ 4
Hello, Janbaz Khan !
For you, the right websites have been found
https://stackoverflow.com/questions/4846999/recursion-tree-method
https://stackoverflow.com/questions/12382448/recursion-tree-method-of-solving-recurrences
0
You just call the function itself again in the function. Given the output of it as parameter(s).
Example, Python 3:
def func(inputVal):
outputVal = None
# Do the stuff you want here...
return func(outputVal)
Exp Tip: Place a condition to break recursion. Cuz else it will be a while(true) loop.
Hope that helps : D