Question:

The recurrence T(n) = 2T(n/2) + n has a solution of _______.

Show Hint

For divide and conquer recurrences, master theorem can be used to determine the complexity quickly.
Updated On: Jun 16, 2025
  • O(n)
  • O(nlogn)
  • O(n²)
  • O(logn)
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

The given recurrence is a divide and conquer recurrence, and it can be solved using the master theorem. The solution to this recurrence is O(nlogn), as it fits the second case of the master theorem.
Was this answer helpful?
0
0