Solve T(n)=2T(n/2)+n log n via master method
Analyze the solve t(n)=2t(n/2)+n log n via master method.
Examples
Input: "test_input_1"
Output: "output_1"
Input: "test_input_2"
Output: "output_2"
Hints
Identify the values of a, b, and f(n) in the given recurrence relation t(n)=2t(n/2)+n log n to apply the Master Method.
Compare the growth rate of f(n) = n log n with n^(log_b(a)) = n^(log_2(2)) = n^1 = n to determine which case of the Master Method applies.
Since f(n) = n log n is asymptotically larger than n but polynomially smaller than n^(log_b(a) + ε) for some ε > 0, verify if the regularity condition holds to conclude that the solution is t(n) = Θ(f(n)) = Θ(n log n).
Solve T(n)=2T(n/2)+n log n via master method
Analyze the solve t(n)=2t(n/2)+n log n via master method.