// output of ./demo/ds/deque-demo.cc:
// Description:
//% Demo of the double ended queue (deque) data structure.

arg 1: 3 == n  [size of deque]  default=3
    
insert_first( 1)        1
insert_last(51)         1 51
insert_first( 2)        2  1 51
insert_last(52)         2  1 51 52
insert_first( 3)        3  2  1 51 52
insert_last(53)         3  2  1 51 52 53
extract_first()= 3      2  1 51 52 53
extract_last()= 53      2  1 51 52
insert_first( 4)        4  2  1 51 52
insert_last(54)         4  2  1 51 52 54
extract_first()= 4      2  1 51 52 54
extract_last()= 54      2  1 51 52
extract_first()= 2      1 51 52
extract_last()= 52      1 51
extract_first()= 1     51
extract_last()= 51    
insert_first( 5)        5
insert_last(55)         5 55
extract_first()= 5     55
extract_last()= 55    
extract_first()= (deque is empty)     
extract_last()=  (deque is empty)     
insert_first( 7)        7
insert_last(57)         7 57
