The Recursion Tree Method is a way of solving recurrence relations. In this method, a recurrence relation is converted into recursive trees. Each node represents the cost incurred at various levels of recursion. To find the total cost, costs of all levels are summed up.
Steps to solve recurrence relation using recursion tree method:
Let us see how to solve these recurrence relations with the help of some examples:
Question 1: T(n) = 2T(n/2) + c
#algorithms #gate cs #recursion #algorithms-analysis of algorithms (recurrences) #time complexity