Launch your tech mastery with us—your coding journey starts now!
Course Content
Data Structure

The Master Theorem is used to determine the time complexity of “Divide and Conquer” algorithms. It solves recurrences of the form:

T(n) = aT(n/b) + f(n)

Where:

  • n = size of the problem.
  • a = number of sub-problems in the recursion.
  • n/b = size of each sub-problem.
  • f(n) = cost of the work done outside the recursive calls (like dividing and merging).

In Java, this is used to prove that Merge Sort has a complexity of O(n log n).