So I've got this assignment to write various data structures. No big deal. I've just got one more to write, a Doubly Linked List. But wait, I already wrote a Deque... aren't those pretty much the same thing or am I missing something?
According to the assignment, both data structures hold a node which in turn points to the nodes before and after it. It seems as if the only difference is the fact that I'm supposed to write more methods for the Doubly Linked List.
Basically, a dequeue only allows insertion (and deletion) at the front and back, while a list allows insertion in the middle of it.
A dequeue implies the operations that can be performed on it, push/pop from either end. A doubly linked list implies the structure of the data. You can implement a dequeue with a doubly linked list, but not the other way around.
Alright, then I guess they're pretty much the same for this assignment since it had me write a method to insert into the middle of the deque (and since I used a doubly linked list to write it).
Thanks.