Your ListIterator
exhibits the same behavior as Java’s
implementation. I would suggest playing around
with the Java
implementation to get a feeling for what it can and cannot do.
Here’s some code to help get you started:
Once you understand the dynamics, this image gives you an idea of things you might want to consider while implementing your methods.
Notice how the ListIterator
uses a new Node
. This node is a placeholder that serves as a cursor.