Deque implementation using double linked list for Coursera.