deque implemented on linked-lists