Abstract
This chapter covers stacks and queues; both are versatile data structures commonly used in the implementation of other, more complex data structures. You will learn what stacks and queues are, how and when they are used, and how to implement them. Finally, the exercises will help you to understand these concepts as well as when to apply stacks and queues to an algorithmic problem.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
- 3.
This could be improved to O(1) with a linked-list implementation.
- 4.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Sammie Bae
About this chapter
Cite this chapter
Bae, S. (2019). Stacks and Queues. In: JavaScript Data Structures and Algorithms. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3988-9_12
Download citation
DOI: https://doi.org/10.1007/978-1-4842-3988-9_12
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-3987-2
Online ISBN: 978-1-4842-3988-9
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books