I have a binary tree storing ints implemented using an array. The internal state looks like this:

8,7,6,4,1,3,5,2

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?

Reply via email to