Skip to main content
1 of 2

Worst Case Space Complexity of Merge Sort and Bubble Sort

I understand that the worst space complexity of Bubble Sort is constant O(1), since all the space we need is the array where the elements were stored. But why does Merge Sort worst space complexity is O(n) linear? All space we need is the exact number of the elements right? Please enlighten me.