Another operation that could be added to the ADT Stack is one that removes and discards the
Fantastic news! We've Found the answer you've been seeking!
Question:
Another operation that could be added to the ADT Stack is one that removes and discards the user specified number of elements from the top of the stack. Assume this operation is called popAndDiscard and that it does not return a value and accepts a parameter called count of data type int.
a. Add this operation to the StackListBased implementation given in this chapter.
b. Add this operation to the StackArrayBased implementation given in this chapter.
c. Add this operation to the StackReferenceBased implementation given in this chapter.
Posted Date: