Nepal's open education portal

EduNepalEduNepal
Objective1 markeasySolution

What is the worst-case time complexity of Quick Sort algorithm?

  • AO(n)
  • BO(n log n)
  • CO(n^2)
  • DO(log n)
Data Structures and Algorithms

Verified Solution & Step-by-Step Explanation

solution · en · Verified by Editorial Board

Correct Answer: (c) O(n^2)

Explanation: Quick Sort encounters worst-case time complexity O(n2) when the pivot chosen is consistently the extreme element (smallest or largest), such as when partitioning an already sorted array.