Solve T(n)=3T(n/4)+n log n - which case?
Analyze the solve t(n)=3t(n/4)+n log n - which case?.
Examples
Input: "test_input_1"
Output: "output_1"
Input: "test_input_2"
Output: "output_2"
Hints
Compare the given recurrence t(n) = 3t(n/4) + n log n with the standard form of the Master Theorem: T(n) = aT(n/b) + f(n), and identify the values of a, b, and f(n).
Calculate the critical exponent c = log_b(a) = log_4(3) ≈ 0.792, then compare it with the growth rate of f(n) = n log n by evaluating the limit lim(n→∞) f(n)/(n^c).
Since f(n) = n log n grows faster than n^c (where c ≈ 0.792), this case falls under the third case of the Master Theorem, where f(n) dominates. Thus, the solution is t(n) = Θ(f(n)) = Θ(n log n).
Solve T(n)=3T(n/4)+n log n - which case?
Analyze the solve t(n)=3t(n/4)+n log n - which case?.