Created
December 16, 2014 19:36
-
-
Save ahirschberg/98df1077040a5da56ac7 to your computer and use it in GitHub Desktop.
EIMACS Queue Solution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ListQueue extends LinkedList<Object> | |
{ | |
public boolean isEmpty() { return size() == 0; } | |
public boolean add( Object x ) | |
{ | |
addLast( x ); | |
return true; | |
} | |
public Object remove() { return removeFirst(); } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment