Summary
In this chapter, you learned about two limited access data structures, namely stacks and queues, including regular, priority, and circular ones. It is worth remembering that such data structures have strictly specified ways of accessing elements. All of them also have various real-world applications. Some of them were mentioned in this chapter.
First, you saw how a stack operates according to the LIFO principle. In this case, you can add an element at the top of the stack (a push operation), and remove an element from the top (a pop operation). The stack was shown in two examples, namely for reversing a word and for solving the Tower of Hanoi mathematical game.
In the following part of the chapter, you got to know a queue as a data structure, which operates according to the FIFO principle. In this case, enqueue and dequeue operations were presented. The queue was explained using two examples, both regarding the application simulating a call center. You learned how to...