فوری ترتیب والے الگورتھم کی بدترین صورتحال کا وقت کی پیچیدگی کیا ہے؟
A. O(N log N)
B. None of these
C. O(log N)
D. O(N2)
Explanation
The worst-case time complexity of quick sort occurs when the pivot element is always the smallest or largest element, leading to unbalanced partitions.
In such cases, the algorithm performs poorly with a time complexity of O(N²).