What is the auxiliary space complexity of standard merge sort?

What is the auxiliary space complexity of standard merge sort?
A. O(1)
B. O(log n)
C. O(n)
D. O(n log n)
 
Answer: c
Explanation: The merging of two sorted arrays requires an additional space of n due to which the auxiliary space requirement of merge sort is O(n). Thus merge sort is not an in place sorting algorithm.
 

Tìm kiếm

Back
Top