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)

Explanation:

Gate CS-2019 Question Paper With Solutions

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

LEAVE A REPLY

Please enter your comment!
Please enter your name here