custom sorting of lists ?
    Carl Sturtivant 
    sturtivant at gmail.com
       
    Wed Oct 17 18:03:43 UTC 2018
    
    
  
On Monday, 15 October 2018 at 13:39:59 UTC, Steven Schveighoffer 
wrote:
>
> But that's just the thing -- merge sort *does* depend on the 
> container type. It requires the ability to rearrange the 
> elements structurally, since you merge the sets of items 
> together. This requires making another list from the original 
> list, and ranges don't lend themselves to that.
>
> One thing you *can* do is allocate an array beside the original 
> container, and move things back and forth. But this is not 
> required if you have a linked-list type which can simply be 
> restructured without moving.
Doesn't this just mean a new special kind of range is needed to 
be defined?
    
    
More information about the Digitalmars-d-learn
mailing list