Gate CS-2015-1 Question Paper With Solutions

Q. 12 Which one of the following is the recurrence equation for the worst case time
complexity of the Quicksort algorithm for sorting n^$ 2h 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

Answer: (B)

Explanation:

Gate CS-2015-1 Question Paper With Solutions

Learn More:   Gate EC-2015 - 3 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here