Given a set of n integers the worst case time complexity of quick sort is

2026

Given a set of n integers the worst case time complexity of quick sort is

Answer: C. θ(n²)The worst-case time complexity of quick sort is O(n2), which occurs when the pivot selection consistently results in unbalanced partitions, such as always…

  1. A.

    θ(n)

  2. B.

    θ(n log n)

  3. C.

    θ(n²)

  4. D.

    θ(n² log n)

Attempted by 513 students.

Show answer & explanation

Correct answer: C

The worst-case time complexity of quick sort is O(n2), which occurs when the pivot selection consistently results in unbalanced partitions, such as always choosing the smallest or largest element.

Explore the full course: Tpsc Assistant Technical Officer

Loading lesson…