6
STACKS AND QUEUES
In the earlier chapters we have seen the primitive data structures that are available in C. We have also looked through arrays and strings. The array data structure is implemented with storage structure as memory, while string data structure is implemented with arrays as their storage structures. There are many other simple but important data structures. These are simple because they can be implemented using arrays as their storage structures. Other implementations of these data structures are also possible. In this chapter, we have considered two such important data structures, stacks and queues.
6.1 INTRODUCTION TO STACK
Consider the problem of reading 50 integers and printing them in reverse order. This problem inherently ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access