ericdrowell / BigOCheatSheet

1.07k stars 314 forks source link

Update Tables.html: Correction for Quick Sort worst-case space comple… #160

Closed bahadirbasaran closed 7 months ago

bahadirbasaran commented 1 year ago

…xity

The worst-case space complexity of the Quick Sort Algorithm is not O(log(n)). In the worst-case scenario, Quick Sort has a space complexity of O(n) due to the potentially unbalanced partitioning. If the pivot chosen at each step consistently divides the array in an unbalanced manner, it can lead to a recursion depth of 'n,' resulting in O(n) space complexity.