An array of 25 distinct elements is to be sorted using quick sort. Assume that…

PYQ CoCubes 2024

An array of 25 distinct elements is to be sorted using quick sort. 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 _________.

  1. A.

    0.08

  2. B.

    0.05

  3. C.

    1

  4. D.

    1.5

Attempted by 202 students.

Sign up free to check your answer

Sign up free

Explore the full course: Cdac C Cat Complete Preparation

Loading lesson…