1. Is the constructor really needed for the linked list version of the stack? What would happen if we omitted the constructor?
2. Do a time analysis of the size method for the linked list version of the stack. If the method is not constant time, then can you think of a different approach that is constant time?
3. What kind of exception is thrown if you try to pop an empty stack? Which Java Class Library defines this exception?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here