When an erase method is applied to a list, it invalidates any iterator that is referencing the removed node. Such an iterator is called stale. Describe an efficient algorithm that guarantees that any operation on a stale iterator acts as though the iterator’s current is nullptr. Note that there may be many stale iterators. You must explain which classes need to be rewritten in order to implement your algorithm.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.