Is it possible to elegantly create a range over a binary heap?
Gary Willoughby via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Dec 27 12:01:47 PST 2015
On Sunday, 27 December 2015 at 17:23:35 UTC, Gary Willoughby
> I have a binary tree storing ints implemented using an array.
> The internal state looks like this:
> When extracting this data, it is returned as 8,7,6,5,4,3,2,1.
> Is it possible to elegantly add a range on top of the internal
> state to return the correct value order I would expect when
> extracting? Is there an algorithm documented somewhere for
> doing this?
Some explanatory reference:
More information about the Digitalmars-d-learn