The merge() function of thr merge sort. The one which merges the sorted sub-arrays into a single sorted array requires foo much memory. Is there any way to reduce the memory needed?
            Asked
            
        
        
            Active
            
        
            Viewed 202 times
        
    0
            
            
        - 
                    Maybe related: https://stackoverflow.com/questions/2571049/how-to-sort-in-place-using-the-merge-sort-algorithm – Thilo Sep 29 '19 at 06:13
- 
                    Based on a 1992 paper, here is a link to [github source](https://github.com/Mrrl/GrailSort) for a merge sort that can run without a buffer. This particular variation looks for 2 sqrt(n) unique values that can be moved to provide space for merging, and yet maintain stability (since these values are unique, reordering them before sorting doesn't affect stability). – rcgldr Sep 29 '19 at 09:16
