Having trouble getting started on an assignment for my c++ class. I understand how stacks/queues work, but what I don't quite understand is how they work as adapters, i've read plenty of sites but none really have given me a good example of how they work when implemented using a container. The project we were given asks us to use the deque class to store 2 stacks.One stack updates its elements with push_front( ) / pop_front( ), and the other stack uses push_back( ) / pop_back( ).
My original idea:
-create a stack class, and #include <deque>
-create a deque named dualstk to use to store the stacks.
-create the methods/constructors used for stacks.
Overall the main confusion I myself am having is how to go about this, I don't really need code, I just need a better explanation/algorithm or something to help me understand how to work this. Any help would be greatly appreciated! Thanks!