Finish implementation of Deque class.