In previous chapters, we covered linear data structures, such as an array, vector, and LinkedList. We were able to do any operation with any element. This chapter focuses mostly on abstracting those operations only to a certain element. This kind of abstraction can be looked at when we understand about data structures, such as stacks and queues. A stack is a data structure that allows us only to operate on the last element, whereas a queue allows us only to operate on the first and last element.
The following topics will be covered in this chapter:
- Understanding stacks
- Operations on stacks
- Implementation of stacks
- Understanding queues
- Operations on queues
- Implementation of queues
- Introducing circular queues
- Understanding deque ( short for double-ended queue)