Merge sort time and space complexity
a) Yes – in a perfect world you’d have to do log n merges of size n, n/2, n/4 … (or better said 1, 2, 3 … n/4, n/2, n – they can’t be parallelized), which gives O(n). It still is O(n log n). In not-so-perfect-world you don’t have infinite number of processors and context-switching … Read more