Computer Sciences > Gate 2015 Set-1 > Complexity
Which one of the following is the recurrence equation for the worst case time complexity of the Quicksort algorithm for sorting n ( ≥ 2) numbers? In the recurrence equations given in the options below, c is a constant.
A
T(n)=2T(n/2)+cn
B
T(n)=T(n–1)+T(0)+cn
C
T(n)=2T(n–2)+cn
D
T(n)=T(n/2)+cn

Correct : Complexity

Similar Questions

Consider a complete binary tree where the left and the right subtrees of the root are max-heaps. The lower bound for the number of operations to convert the tre...
#50 MCQ
Assume that the algorithms considered here sort the input sequences in ascending order. If the input is already in ascending order, which of the following are T...
#109 MCQ
The worst case running times of Insertion sort, Merge sort and Quick sort, respectively, are:
#143 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......