On Wednesday, 5 August 2015 at 11:09:29 UTC, Per Nordlöw wrote:
On Wednesday, 5 August 2015 at 09:04:54 UTC, Nordlöw wrote:
This will however duplicate the underlying array aswell, which is probably not what we want. How do we avoid this?

Correction: the underlying storage array *must* be duplicated whenever we want to iterate over it without side effects in the original instance. That's just the way binary heaps work.

Crazy idea: what about a range that lazily copies as it needs to? I.e. copy-on-write

Reply via email to