Going through some really valuable and practical C++ issues from this resource from Stanford, I came across the deque STL class in C++. Seems pretty interesting to me. Although there are performance issues to take into consideration, seeing as, unlike the vector class which ensures that all elements come from contiguous blocks of memory, the deque implementation is a little different in that the elements might be spread out across different pages in the memory. However, it does allow for pushing and popping from both ends of the queue (hence the name deque – double ended queue), and in certain situations when the queue is going to be small and you are frequently going to be pushing and popping at both ends, deque is a really invaluable resource to have in your toolkit. This location very nicely and thoroughly differentiates deques from vectors. One of the exercises in the course reader was a ring buffer, which I implemented and posted here – really straightforward and simple to implement.