\n
Recursion Tree Calculator
\nCalculate time complexity of recursive functions by analyzing the recursion tree. Enter the recurrence relation and see the estimated time complexity.
\n\n\n
\n\n How This Calculator Works
\nEnter the recurrence relation in the form T(n) = aT(n/b) + f(n), where:
\n- \n
- a – Number of subproblems \n
- b – Factor by which the problem size is reduced \n
- f(n) – Cost of work done outside recursive calls \n
The calculator will analyze the recursion tree and determine the time complexity using the Master Theorem.
\n\n
\n\n \n \n \n \n
\n \n \n \n \n \n
\n\n \n \n \n
\n\n \n \n \n \n
\n\n \n \n \n
\n\n \n Analysis Results
\nRecurrence Relation: T(n) = 2T(n/2) + O(1)
\nCase:
\nTime Complexity: O(1)
\nExplanation:
\n \n\n \n
\n\n \n \n
\n