ArrayStack Practice Quiz
Practice Problem
Take out a piece of paper and put your name on the upper right corner.
Write the following method for the ArrayStack class:
public interface Stack211<E> {
boolean empty();
E peek();
E pop();
E push(E item);
}
public class ArrayStack<E> implements Stack211<E> {
private E[] data;
private int top;
...
public E push(E item) {
// your code here.
}
...
}
Be sure to write JavaDoc comments for your code.
Conduct a quick review of your code, before you are done.
After the code, write an explanation the Big-O performance of the push method.
Time Remaining:
You can restart the timer by reloading the page.
Try to complete the problem in 15 minutes.
If you cannot complete the program in 15 minutes, you can watch me solve the problem in a text editor.