How to sort in-place using the merge sort algorithm?

前端 未结 10 1618
心在旅途
心在旅途 2020-11-22 02:21

I know the question is not too specific.

All I want is someone to tell me how to convert a normal merge sort into an in-place merge sort (or a merge sort with const

10条回答
  •  -上瘾入骨i
    2020-11-22 03:01

    There is a relatively simple implementation of in-place merge sort using Kronrod's original technique but with simpler implementation. A pictorial example that illustrates this technique can be found here: http://www.logiccoder.com/TheSortProblem/BestMergeInfo.htm.

    There are also links to more detailed theoretical analysis by the same author associated with this link.

提交回复
热议问题