Hello everyone!
The linear arrays discussed in the previous posts allows one to insert and delete at any position in the list – at the beginning, at the middle or at the end. There are certain frequent situations in computer science when one wants to restrict insertions and deletions so that they can take place only at the beginning or at the end of the list, not at the middle. Two of the data structures that are useful in such situations are queues and stacks. In this lesson, we are going to study more about stacks!