GATE Exam | Aptitude Questions | GATE Syllabus | GATE Result | Mock Test | GATE Preparation
0 votes

Suppose we have a O(n) time algorithm that finds median of an unsorted array. Now consider a QuickSort implementation where we first find median using the above algorithm, then use median as pivot. What will be the worst case time complexity of this modified QuickSort.

A

O(n^2 Logn)

B

O(n^2)

C

O(n Logn Logn)

D

O(nLogn)

asked in Searching, sorting by gate

1 Answer

0 votes
D

O(nLogn)
answered by gate

Related questions

The best answer to any question