Dynamic chain for ranges?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Mon Jun 13 14:28:19 UTC 2022


On Monday, 13 June 2022 at 14:03:13 UTC, Steven Schveighoffer 
wrote:
> Merge sort only works if it's easy to manipulate the structure, 
> like a linked-list, or to build a new structure, like if you 
> don't care about allocating a new array every iteration.

The easiest option is to have two buffers that can hold all 
items, in the last merge you merge back to the input-storage. But 
yeah, it is only «fast» for very large arrays.



More information about the Digitalmars-d-learn mailing list