Re: Extracting Sorted Storage from BinaryHeap

2015-03-29 Thread Ivan Kazmenko via Digitalmars-d-learn
On Sunday, 29 March 2015 at 20:05:22 UTC, Nordlöw wrote: What's the most efficient way to extract a the storage from a BinaryHeap and then sort it? Is there a better way other than binaryHeap.release.sort than makes use of the heap property? For example while (!binaryHeap.empty)

Extracting Sorted Storage from BinaryHeap

2015-03-29 Thread Nordlöw
What's the most efficient way to extract a the storage from a BinaryHeap and then sort it? Is there a better way other than binaryHeap.release.sort than makes use of the heap property? For example while (!binaryHeap.empty) { sortedStorage ~= binaryHeap.front; binar