In the LinkedList implementation of Section 16.1, we use a flag isAfterNext to ensure that calls to

Question:

In the LinkedList implementation of Section 16.1, we use a flag isAfterNext to ensure that calls to the remove and set methods occur only when they are allowed. It is not actually necessary to introduce a new instance variable for this check. Instead, one can set the previous instance variable to a special value at the end of every call to add or remove. With that change, how should the remove and set methods check whether they are allowed?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question
Question Posted: