Chapter 4 Stacks and Queues

Definition of stack

The stack is a linear table limited to insert and delete operations only at the end of the table

Stack storage structure

Sequential storage: At the same time, a shared stack can be used to save space.
Chain storage: similar to a linked list in a linear list

Stack application

Realization of Recursive Fibonacci Sequence
Evaluation of Four Arithmetic Expressions

Queue definition

A queue is a linear table that only allows insert operations at one end and delete operations at the other end.
Sequential queue Circular queue
Chain queue

Guess you like

Origin blog.csdn.net/mogbox/article/details/109219330
Recommended