The worst-case time complexity of QuickSort is:

2025

The worst-case time complexity of QuickSort is:

  1. A.

    O(n)

  2. B.

    O(n log n)

  3. C.

    O(n^2)

  4. D.

    O(2^n)

Attempted by 91 students.

Show answer & explanation

Correct answer: C

QuickSort has worst-case time complexity O(n^2), for example when poor pivots repeatedly split the array very unevenly.

Explore the full course: Coding For Placement