Input
Here the deque is implemented by a doubly linked list with a header. Front and Rear point to the two ends of the deque respectively. Front always points to the header. The deque is empty when Front and Rear both point to the same dummy header.
Output
Note: Push and Inject are supposed to return 1 if the operations can be done successfully, or 0 if fail. If the deque is empty, Pop and Eject must return ERROR which is defined by the judge program.
Pop
Inject 1
Pop
Eject
Push 1
Push 2
Eject
Inject 3
End
Deque is Empty!
Deque is Empty!
Inside Deque: 2 3