Medium

Merge Sort

Merge sort splits the list in half, sorts each half, and merges the two sorted halves. The split depth is logarithmic.

Costs

CategoryAlgorithm
DifficultyMedium
TimeO(n log n)
Extra memory for the mergeO(n)
Stableyes, in the usual implementation

Questions

What is Merge Sort?

Merge sort splits the list in half, sorts each half, and merges the two sorted halves. The split depth is logarithmic.

Where do I practice it?

DSA Master keeps challenges and progress on the phone. This page is the idea and the costs.