 With this version it is better to allocate the temporary space outside the "merge" routine, so that only one allocation is needed.The excessive copying mentioned previously is also mitigated, since the last pair of lines before the "return result" statement (function " merge "in the pseudo code above) become superfluous.One drawback of merge sort, when implemented on arrays, is its working memory requirement.