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

What is recurrence for worst case of QuickSort and what is the time complexity in Worst case?

A

Recurrence is T(n) = T(n-2) + O(n) and time complexity is O(n^2)

B

Recurrence is T(n) = T(n-1) + O(n) and time complexity is O(n^2)

C

Recurrence is T(n) = 2T(n/2) + O(n) and time complexity is O(nLogn)

D

Recurrence is T(n) = T(n/10) + T(9n/10) + O(n) and time complexity is O(nLogn)

asked in Searching, sorting by gate

1 Answer

0 votes
B

Recurrence is T(n) = T(n-1) + O(n) and time complexity is O(n^2)
answered by gate

Related questions

The best answer to any question