Space Complexity Flashcards
1
Q
Iterative O(1)
A
It uses a constant amount of space for L, R and M
2
Q
Recursive 0(log n)
A
At each recursive call, a new layer is added to the call stack and will allocate additional memory to it.
3
Q
A