less than 1 minute read

Categories:

Tags:

Stack is a Last In First Out(LIFO) data structure. The class template acts as a wrapper to the underlying container and it pushes/pops the element from the back of the underlying container, known as the top of the stack.

template<
    class T,
    class Container = std::deque<T>
> class stack;

T - type of the stored element. Container - The type of the underlying container to use to store the elements. The container must satisfy the requirements of SequenceContainer. Additionally, it must provide the following functions with the usual semantics

Lets try using different squential container and see how they performs.

stl stack with different container

Leave a comment