| | | | | next -> |

Deque Complexity of Operations

   Deque Operation   Runtime Complexity
     Actual   Requirement
   PopFront(), PopBack(), Clear()
   Front(), Back()
   Empty(), Size()
   bracket operator []
   Θ(1)    O(1)
   PushFront(t), PushBack(t)    Amortized Θ(1)    Amortized O(1)
   assignment operator =    Θ(n), n = Size()    O(n), n = Size()
   Constructors, Destructor
  
   Θ(n), n = Size()       O(n), n = Size()   
   Display(os,ofc)    Θ(n), n = Size()     
   Dump(os)    Θ(n), n = Size()     

Note that Θ(1) and O(1) are equivalent


| next -> | Top of Page | 4. Generic Positional Containers and Double Ended Queues - 10 of 10