Amazon Interview Question

Implement a deque.