Data Structures & AlgorithmsHardProduct-company MCQ pattern

What is the solution of T(n) = T(n/3) + T(2n/3) + n?

  1. A. Θ(n)
  2. B. Θ(n²)
  3. C. Θ(n log n)
  4. D. Θ(n^1.58)

Correct answer: C. Θ(n log n)

Every full level of the recursion tree costs n, and the longest path (always taking 2n/3) has log₃/₂ n levels, so the total is Θ(n log n). The master theorem does not apply directly because the split is uneven.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic