Stack Module: Ability to “Peek” in Stack
For the stack module given in Figure 7-15, redesign and re-implement the relevant parts of the module to allow the ability to “peek” into the stack to find out if a given element is on the stack or not. Write a small program to demonstrate this new version of the stack module.
FIGURE 7-15 Programmer-Defined Stack Module
No comments:
Post a Comment