2 ms·
In addition to not being able to delete the last node, it also invalidates any pointers to the node after the one you're deleting.
by TheCoelacanth 14y ago
In addition to not being able to delete the last node, it also invalidates any pointers to the node after the one you're deleting.
- jdmichal 14y agoGreat point, and not something I had thought of. Just makes the "expected" solution even more odd... If you're exposing nodes enough to get an operation to delete a particular node with no context, then the given solution just invalidated a completely different node, but not the one you asked it to delete. No, the one you asked it to delete is still valid, just with different data associated.