STACK AND QUEUE DATA STRUCTURES: ALGORITHMS, APPLICATIONS AND EFFICIENCY ANALYSIS
Authors/Creators
- 1. Associate professor in Asia International University
Description
Stack and queue are two foundational linear data structures that underpin a vast array of algorithms and computing systems. This article provides a comprehensive examination of the stack (Last-In, First-Out — LIFO) and queue (First-In, First-Out — FIFO) data structures, detailing their operational principles, algorithmic implementations, time and space complexity analyses, and practical applications. The stack is widely employed in function call management, expression evaluation, syntax parsing, and backtracking algorithms, while the queue plays a central role in process scheduling, breadth-first graph traversal, printer spooling, and buffering systems. The article demonstrates how both structures can be implemented using arrays and linked lists, compares their performance characteristics, and discusses advanced variants such as the deque (double-ended queue), priority queue, circular queue, and monotonic stack. Special attention is given to real-world use cases in operating systems, compilers, network packet routing, and artificial intelligence. The article also highlights common implementation pitfalls, including stack overflow, queue underflow, and memory management issues, and provides algorithmic solutions to classic problems — such as balanced parentheses checking, next greater element, and task scheduling — to illustrate the practical power of these structures.
Files
1069-1074.pdf
Files
(276.5 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:93be9b09861a654ef3dc18ef5293c38a
|
276.5 kB | Preview Download |
Additional details
References
- Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2009). Introduction to Algorithms (3rd ed.). MIT Press.
- .Sedgewick, R., & Wayne, K. (2011). Algorithms (4th ed.). Addison-Wesley Professional.
- .Knuth, D. E. (1997). The Art of Computer Programming, Volume 1: Fundamental Algorithms (3rd ed.). Addison-Wesley.
- .Skiena, S. S. (2008). The Algorithm Design Manual (2nd ed.). Springer.
- Goodrich, M. T., Tamassia, R., & Goldwasser, M. H. (2014). Data Structures and Algorithms in Python. Wiley.