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

The STACK with the minimum of exercise 3.14 of Morin's book, beyond the book. More...

Files

file  ADS/stack/MinStack.h
 The STACK with the minimum of exercise 3.14 of Morin's book, beyond the book [see ADT.h]: push(), pop(), top(), size() and min(), the least item inside, all in \( O( 1 ) \) amortized time (worst case but for the doublings of the vectors).

Classes

class  ADS::MinStack< T, C >
 a STACK with its least item in \( O( 1 ) \) time More...

Detailed description

The STACK with the minimum of exercise 3.14 of Morin's book, beyond the book.

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