3,316 views
1 votes
1 votes

In a modified merge sort, the input array is split at a position one-third of the length(N) of the array. What is the worst case time complexity of this merge sort?

A

N(logN base 3)

B

N(logN base 2/3)

C

N(logN base 1/3)

D N(logN base 3/2)

1 Answer

1 votes
1 votes

Answer would be D)

N(logN base 3/2)

 

recurrence would be T(N) = T($\frac{N}{3}$) + T($\frac{2N}{3}$) + N

solve it using tree so $\frac{2^kN}{3^k}$= 1 at at K+1 level so,k=$log_\frac{3}{2}$n

at each level workdone is n so n+n+n+.....(k+1)time ,

$n*(k+1)$=$n$*($log_\frac{3}{2}$n+1)=$\theta($n$log_\frac{3}{2}$n)

No related questions found