Which condition causes worst-case time complexity in Quick Sort?
14 views
- Random pivot
- Balanced partition
- Already sorted array with first element pivot (Correct Answer)
- Equal elements
Explanation
If pivot is smallest/largest element (e.g., sorted array), partitions become highly unbalanced → O(n²) worst-case complexity.