Gate CS-2019 Question Paper With Solutions

Q. 30 An array of 25 distinct elements is to be sorted using quicksort. Assume that the pivot element is chosen uniformly at random. The probability that the pivot element gets placed in the worst possible location in the first round of partitioning (rounded off to 2 decimal places) is _________.

Note: This was Numerical Type question.

(A) 0.08

(B) 0.0016

(C) 0.04

(D) 0.0008

Answer: (A)


Learn More:   Gate ME-2017-2 Question Paper With Solutions


Please enter your comment!
Please enter your name here