Whats wrong with binery heap or i am not understand something?

Steven Schveighoffer schveiguy at gmail.com
Thu Apr 2 13:28:29 UTC 2020


On 4/2/20 9:25 AM, WebFreak001 wrote:
> If BinaryHeap implemented a save() method it would be possible to do 
> this without duplicating because writeln would call save to not modify 
> the existing data.

A binary heap has to move elements in order to iterate. So a save call 
would be equivalent to a dup call.

I think that's why it supports dup and not save.

-Steve


More information about the Digitalmars-d-learn mailing list