when implementing an std::stack
there are a few options, for example:
// stack with default underlying deque
std::stack< int > intDequeStack;
// stack with underlying vector
std::stack< int, std::vector< int > > intVectorStack;
// stack with underlying list
std::stack< int, std::list< int > > intListStack;
what advantages and disadvantages do i gain from defining std::stack
on different containers when all i get from it is the same operations " push, pop and top " ?
in other words: what is the difference between a stack of deque and a stack of vector and a stack of list and why would i want to choose anything other than deque?