Understand how stacks and queues may be implemented.
This assigment is to be turned in at by the February 29 class.
Suppose the following operations are performed on an
newly created stack S
.
S.push(202)
S.push(242)
S.pop()
S.push(255)
With a pencil drawing, illustrate the implementation of these four operation using both the array-based implementation (Figure 7-5, p. 365) and the reference-based implementation (Figure 7-6, p. 368).
For each implementation, your answer should look a bit like four of the related figure.
You are allowed to work with others on this assignment, but the drawing you turn it must have been generated by your own hand.