Amdocs Interview Question

Convert a doubly linked list into a dequeue.