Algorithms and Data Structures · Middle · Question 2 of 75

What is the main drawback of merge sort on arrays?

Explanation

The merge step writes into a temporary buffer. The time is O(n log n) regardless of the input, and the classic implementation is stable. On linked lists merge sort can be done without the extra buffer.

Further reading

Problem with a question

Algorithms and Data Structures · Middle · question 2

Test yourself

Take the Algorithms and Data Structures · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz