EX 4.5. Modify the algorithm from the previous exercise so that it makes use of a rear
reference. How does this affect the time complexity of this and the other
operations?
Create a new node containing a reference to the object to be placed on the
stack.
EX 4.6. Discuss the effect on all operations on a stack if there were not a count variable in
the implementation.
Push and pop would be minimally affected. The only difference would be that the
count variable would not have to be updated. Peek would not be affected at all.
EX 4.7. Discuss the impact (and draw an example) of using a sentinel node or dummy
node at the head of a list.
A sentinel node allows the operations to assume there is a node (at least the
EX 4.8. Draw the UML class diagram for the iterative maze solver example from this
chapter.