More Sorting Flashcards

1
Q

What is quicksort space complexity and why?

A

O(logn). Because while it’s in place, it still calls itself recursively which uses O(logn) space on the stack

How well did you know this?
1
Not at all
2
3
4
5
Perfectly