What is the space complexity of Bottom-up merge sort? It uses iteration rather than recursion so it will not use stack. But will an auxiliary array be used for the merge operation? Please explain. Thank you.
Yes, an auxiliary array is required for the merge operation. The space complexity would be $\Theta(n)$, where $n$ is the size of the input.
The merge subroutine can create a temporary array to store the result of the merge operation and its contents can then be copied into the input array. Or, an array having the same size as input can be created in the beginning and passed as an extra argument to the merge subroutine.