what is the explanation of deque can any one help me?

101 Views Asked by At

I am learning stl and learn how to use all stl containers and i need to knew when i have to use deque in my program. what is the different between deque and other stl containers

1

There are 1 best solutions below

1
On BEST ANSWER

http://www.cplusplus.com/reference/deque/deque/

You can push elements to a deque on both ends.

Example: You can use a deque as "history". The oldest items are in front. Now you have easy access on the newest element and the oldest. (It is good for a undo function)