4 ms·
"In-place" usually means "using only a constant amount of additional storage." You're using a constant amount of additional storage if you even use a function
by amalcon 16y ago
"In-place" usually means "using only a constant amount of additional storage." You're using a constant amount of additional storage if you even use a function call (unless you're invoking certain compiler directives and/or optimizations), because C function calls usually involve placing a return address on the stack.
This is also why quicksort is considered to take up log(n) space: it calls itself recursively, and thus uses up a bit of the stack for each recursive call.