Great points, absolutely. There is some work to be done here for practical use beyond coding challenges.
I'm very much a novice - it sounds to me like point 2 could be resolved by just writing better methods that verify this property on insertion. Would that suffice?
Leaked nodes are a little trickier - you could conceivably write up a little "stop-the-world" style cleanup that sweeps through for unlinked nodes, but it's not immediately clear to me how to build that in to this structure without requiring the consumer to be aware.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great points, absolutely. There is some work to be done here for practical use beyond coding challenges.
I'm very much a novice - it sounds to me like point 2 could be resolved by just writing better methods that verify this property on insertion. Would that suffice?
Leaked nodes are a little trickier - you could conceivably write up a little "stop-the-world" style cleanup that sweeps through for unlinked nodes, but it's not immediately clear to me how to build that in to this structure without requiring the consumer to be aware.