Question: public class LinkedStack implements IStack { /** The topmost node of this stack. The stack gets pushed down from here. */ private Node top; //

public class LinkedStack implements IStack {

/** The topmost node of this stack. The stack gets pushed down from here. */ private Node top;

// TODO why don't we need an explicit constructor?

@Override public E push(final E obj) { // TODO return null; }

@Override public E peek() { // TODO return null; }

@Override public E pop() { // TODO return null; }

@Override public boolean isEmpty() { // TODO return false; }

@Override public List asList() { // TODO implement using an ArrayList preallocated with the right size // TODO add any instance variable(s) required to support this return null; } }

//

compete //TODO

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!