Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save anotheremily/330814 to your computer and use it in GitHub Desktop.
Save anotheremily/330814 to your computer and use it in GitHub Desktop.
function Deque() {
this.reset();
}
Deque.prototype.pop = Stack.prototype.pop;
Deque.prototype.push = Stack.prototype.push;
Deque.prototype.dequeue = Queue.prototype.dequeue;
Deque.prototype.enqueue = Queue.prototype.enqueue;
Deque.prototype.empty = Stack.prototype.empty;
Deque.prototype.reset = Stack.prototype.reset;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment