Quiz 8, 10/18
Replace the implementation of the Stack ADT in
myStack.java
with a linked list based implementation.
Specifically, do the following:
- Instead of using an array of long as is currently done in
myStack.java
use the class
LinkList.java
to store a stack of int.
- Replace the current constructor in
myStack.java
by a default (0-argument) constructor that creates an empty stack.
-
Get rid of the isFull method and reimplement the remaining 4 methods by calling appropriate
LinkList methods.
Make sure that all of your methods run in constant time, as they do in the current implementation
of myStack.java.