ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
MinDeque.h

The double ended queue with the minimum of exercise 3.16 of Morin's book, beyond the book. More...

Files

file  ADS/queue/MinDeque.h
 The double ended queue with the minimum of exercise 3.16 of Morin's book, beyond the book: push_front(), push_back(), pop_front(), pop_back(), size() and min(), all in \( O( 1 ) \) amortized time, on two stacks with the minimum [see MinStack.h] back to back, as the DualArrayDeque of Morin's book [see DualArrayDeque.h]: \( F \) with the front on top and \( B \) with the back on top.

Classes

class  ADS::MinDeque< T, C >
 a double ended queue with its least item in \( O( 1 ) \) amortized time More...

Detailed description

The double ended queue with the minimum of exercise 3.16 of Morin's book, beyond the book.

The definitions, the invariants and the costs of the area are in Theory of queues.